source: XMLIO_V2/extract_xios @ 249

Last change on this file since 249 was 246, checked in by hozdoba, 13 years ago

Préparation nouvelle arborescence

  • Property svn:executable set to *
File size: 4.0 KB
Line 
1#!/bin/bash
2
3compil_mode="prod"
4svnbranch="/trunk"
5doc="F"
6extdir="."
7
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
20echo -e "Installation de la bibliothÚque xmlioserver ... "
21
22# Traitement de la ligne de commande
23while (($# > 0))
24   do
25      case $1 in
26         "-h")
27            # A modifier
28            exit;;
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 ;;
39      esac
40   done
41
42# Récupération du répertoire local d'installation
43if  [[  $interactive == "true" && $has_extdir == "false"  ]]
44   then
45      read -p "Entrez le répertoire d'extraction de la bibliothÚque : "$PWD"/" extdir
46fi
47
48install_dir=$PWD/$extdir
49mkdir --parents $install_dir
50
51# Documentation de la distribution
52if  [[ $interactive == "true" && $has_doc == "false" ]]
53   then
54      read -p "Souhaitez-vous extraire la documentation ? [Y/N]: " withdoc
55fi
56
57# Architecture de compilation
58if  [[ $interactive == "true" && $has_arch == "false" ]]
59   then
60      echo -e "\r\nLe serveur d'Entrée/Sortie peut-être installée sur diverses machine parmis lesquels : "
61      echo -e "\tIA64_PLATINE        => Configuration pour la machine de calcul Platine du CCRT !"
62      echo -e "\tX86_LOCGNU_FEDORA   => Configuration locale pour le compilateur GNU sous fedora !"
63      echo -e "\tX86_LOCINTEL_FEDORA => Configuration locale pour le compilateur intel sous fedora !\r\n"
64         
65      read -p "Sur quelle architecture travaillez-vous ? (aucune par défaut): " arch
66fi
67
68case $arch in
69   IA64_PLATINE)       
70      echo "=> Configuration pour la machine de calcul Platine du CCRT !" ;;
71   X86_LOCGNU_FEDORA)   
72      echo "=> Configuration locale pour le compilateur GNU sous fedora !" ;;
73   X86_LOCINTEL_FEDORA) 
74      echo "=> Configuration locale pour le compilateur intel sous fedora !" ;;
75   *)                   
76      echo "=> Aucune configuration d'installation !"
77      arch=
78esac
79
80# Récupération du login de connexion svn
81if  [[ $interactive == "true" && $has_user  == "false" ]]
82   then
83      echo -e -n "Veuillez à présent indiquer votre identifiant de connexion au serveur svn"
84      read -p " forge.ipsl.jussieu.fr (Ne rien écrire si anonyme) : " svnuser
85fi
86
87# Récupération de la branche svn de travail
88if  [[ $interactive == "true" && $has_branch == "false" ]]
89   then
90      read -p "Quelle branche souhaitez-vous extraire ? (/trunk par défaut): " svnbranch
91fi
92
93if [[ -z $svnbranch ]]
94   then
95      svnbranch="/trunk"
96fi
97
98if [[ -z $svnuser ]]
99   then
100      connect="http://forge.ipsl.jussieu.fr/ioserver/svn/XMLIO_V2"$svnbranch
101   else
102      connect="svn+ssh://"$svnuser"@forge.ipsl.jussieu.fr/ipsl/forge/projets/ioserver/svn/XMLIO_V2"$svnbranch
103fi
104
105# Extraction de la distribution
106echo -e "=> Connexion au serveur svn via \""$connect"\"..."
107
108
109if [[ $withdoc == [Yy]* ]]
110   then
111      installopt=$installopt" --doc"
112fi
113
114svn -q co $connect  $install_dir
115
116echo -e "- Décompression des archives ..."
117cd $install_dir
118for tarname in $install_dir/tools/archive/*.tar.gz; do
119   tar -xzf "$tarname"
120done
121
122if [[ !(-z $arch) && -f $install_dir/make_xios ]]
123   then
124      echo -e "Exécution du script d'installation local pour l'architecture \""$arch"\" ..."
125      installopt=$installopt" --"$compil_mode" --arch "$arch
126      cd $install_dir && ./make_xios $installopt
127fi
128
129
Note: See TracBrowser for help on using the repository browser.