source: XIOS/extract_xios @ 305

Last change on this file since 305 was 304, checked in by ymipsl, 12 years ago

Traduction en Anglais...

YM

  • Property svn:executable set to *
File size: 4.1 KB
RevLine 
[244]1#!/bin/bash
2
3compil_mode="prod"
4svnbranch="/trunk"
5doc="F"
6extdir="."
7
[246]8interactive=false
9
10has_interactive=false
11has_rev=false
12has_user=false
13has_branch=false
14has_compil_mode=false
15has_arch=false
16has_doc=false
17has_extdir=false
18
19
[304]20echo -e "Installing XIOS library... "
[244]21
22# Traitement de la ligne de commande
23while (($# > 0))
24   do
25      case $1 in
26         "-h")
27            # A modifier
28            exit;;
[246]29         "--interactive") interactive=true    ; has_interactive=true; shift ;;
30         "--rev")         svnrev=$2           ; has_rev="true"; shift; shift ;;
31         "--user")        svnuser=$2          ; has_user="true"; shift; shift ;;
32         "--branch")      svnbranch=$2        ; has_branch="true"; shift; shift ;;
33         "--prod")        compil_mode="prod"  ; has_compil_mode="true"; shift ;;
34         "--dev")         compil_mode="dev"   ; has_compil_mode="true"; shift ;;
35         "--debug")       compil_mode="debug" ; has_compil_mode="true"; shift ;;
36         "--arch")        arch=$2             ; has_arch="true"; shift; shift ;;
37         "--doc")         withdoc="Y"         ; has_doc="true"; shift ;;
38         *)               extdir="$1"           ; has_extdir=true; shift ;;
[244]39      esac
40   done
41
42# Récupération du répertoire local d'installation
[246]43if  [[  $interactive == "true" && $has_extdir == "false"  ]]
44   then
45      read -p "Entrez le répertoire d'extraction de la bibliothÚque : "$PWD"/" extdir
[304]46      read -p "insert directory path to extract XIOS library : "$PWD"/" extdir
[244]47fi
[246]48
[244]49install_dir=$PWD/$extdir
50mkdir --parents $install_dir
51
52# Documentation de la distribution
[246]53if  [[ $interactive == "true" && $has_doc == "false" ]]
54   then
[304]55      read -p "Do you want to extract documentation ? [Y/N]: " withdoc
[244]56fi
57
58# Architecture de compilation
[246]59if  [[ $interactive == "true" && $has_arch == "false" ]]
60   then
[304]61      echo -e "\r\n XIOS may be install on different computing architecture, choose witch one...\r\n "
62      echo -e "\tIA64_PLATINE        => Configuration for CCRT supercomputer Platine\r\n"
63      echo -e "\tX86_LOCGNU_FEDORA   => Local configuration for gnu compiler under fedora\r\n"
64      echo -e "\tX86_LOCINTEL_FEDORA => Local configuration for intel compiler under fedora \r\n"
65      echo -e "\tX64_TITANE          => Configuration for CCRT supercomputer Titane \r\n"
[250]66     
[304]67      read -p "On which architecture do you want to work ? (default : none): " arch
[244]68fi
69
70case $arch in
71   IA64_PLATINE)       
[304]72      echo "=> Configuration for CCRT supercomputer Platine" ;;
[244]73   X86_LOCGNU_FEDORA)   
[304]74      echo "=> Local configuration for gnu compiler under fedora" ;;
[244]75   X86_LOCINTEL_FEDORA) 
[304]76      echo "=> Local configuration for intel compiler under fedora" ;;
[250]77   X64_TITANE) 
[304]78      echo "=> Configuration for CCRT supercomputer Titane " ;;
[244]79   *)                   
[304]80      echo "=> no specific architecture choosen"
[244]81      arch=
82esac
83
84# Récupération du login de connexion svn
[246]85if  [[ $interactive == "true" && $has_user  == "false" ]]
86   then
[304]87      echo -e -n "insert your svn login"
88      read -p " forge.ipsl.jussieu.fr (nothing if anonymous) : " svnuser
[244]89fi
90
91# Récupération de la branche svn de travail
[246]92if  [[ $interactive == "true" && $has_branch == "false" ]]
93   then
[304]94      read -p "Which branch do tou want to extract ? (default : /trunk): " svnbranch
[244]95fi
96
97if [[ -z $svnbranch ]]
98   then
99      svnbranch="/trunk"
100fi
101
102if [[ -z $svnuser ]]
103   then
104      connect="http://forge.ipsl.jussieu.fr/ioserver/svn/XMLIO_V2"$svnbranch
105   else
106      connect="svn+ssh://"$svnuser"@forge.ipsl.jussieu.fr/ipsl/forge/projets/ioserver/svn/XMLIO_V2"$svnbranch
107fi
108
109# Extraction de la distribution
[304]110echo -e "=> Connecting to svn server via \""$connect"\"..."
[244]111
112
[246]113if [[ $withdoc == [Yy]* ]]
[244]114   then
115      installopt=$installopt" --doc"
116fi
117
[246]118svn -q co $connect  $install_dir
[244]119
[304]120echo -e "- uncompress archives ..."
[244]121cd $install_dir
122for tarname in $install_dir/tools/archive/*.tar.gz; do
123   tar -xzf "$tarname"
124done
125
126if [[ !(-z $arch) && -f $install_dir/make_xios ]]
127   then
[304]128      echo -e "Running installation script for architecture \""$arch"\" ..."
[244]129      installopt=$installopt" --"$compil_mode" --arch "$arch
130      cd $install_dir && ./make_xios $installopt
131fi
132
133
Note: See TracBrowser for help on using the repository browser.