Changeset 352 for trunk/install_superbib.sh
- Timestamp:
- 02/19/14 16:16:49 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/install_superbib.sh
r325 r352 26 26 # 27 27 # .. option:: -lf <login on forge.ipsl.jussieu.fr> 28 # .. option:: -d <directory where executable, input and output will be written> 28 # 29 # .. option:: -d <directory> 30 # 31 # where executable, input and output will be written 29 32 # 30 33 # On the first usage of this tool, :file:`${tempdir}/for_install_superbib/` … … 85 88 system=$(uname) 86 89 case "${system}" in 87 AIX|IRIX64)88 echo "${command} : www : no specific posix checking"89 ;;90 *)91 set -o posix92 ;;90 AIX|IRIX64) 91 echo "${command} : www : no specific posix checking" 92 ;; 93 *) 94 set -o posix 95 ;; 93 96 esac 94 97 unset system … … 101 104 if [ "${PROJECT_LOG}" = "" ] 102 105 then 103 echo "${command} : eee : \${PROJECT_LOG} not defined"104 exit 1106 echo "${command} : eee : \${PROJECT_LOG} not defined" 107 exit 1 105 108 fi 106 109 # … … 108 111 if [ ! -d ${PROJECT_LOG} ] 109 112 then 110 echo "${command} : eee : ${PROJECT_LOG} not found"111 exit 1113 echo "${command} : eee : ${PROJECT_LOG} not found" 114 exit 1 112 115 fi 113 116 # … … 115 118 if [ ! -x ${PROJECT_LOG} ] 116 119 then 117 echo "${command} : eee : ${PROJECT_LOG} not reachable"118 exit 1120 echo "${command} : eee : ${PROJECT_LOG} not reachable" 121 exit 1 119 122 fi 120 123 # … … 122 125 if [ ! -w ${PROJECT_LOG} ] 123 126 then 124 echo "${command} : eee : ${PROJECT_LOG} not writable"125 exit 1127 echo "${command} : eee : ${PROJECT_LOG} not writable" 128 exit 1 126 129 fi 127 130 # … … 138 141 if [ ${#} -lt ${minargcount} ] 139 142 then 140 echo "${command} : eee : not enoughtarguments"141 echo "${usage}"142 exit 1143 echo "${command} : eee : not enough arguments" 144 echo "${usage}" 145 exit 1 143 146 fi 144 147 unset minargcount … … 146 149 while [ ${#} -gt 0 ] 147 150 do 148 case ${1} in149 -lf)150 loginforgeipsl=${2}151 shift152 ;;153 -h)154 hostname=${2}155 shift156 ;;157 -d)158 directory=${2}159 shift160 ;;161 *)162 # anything else163 echo "${command} : eee : unknown option ${1}"164 echo "${command} : eee : ${usage}"165 exit 1166 ;;167 esac168 # next flag169 shift151 case ${1} in 152 -lf) 153 loginforgeipsl=${2} 154 shift 155 ;; 156 -h) 157 hostname=${2} 158 shift 159 ;; 160 -d) 161 directory=${2} 162 shift 163 ;; 164 *) 165 # anything else 166 echo "${command} : eee : unknown option ${1}" 167 echo "${command} : eee : ${usage}" 168 exit 1 169 ;; 170 esac 171 # next flag 172 shift 170 173 done 171 174 # … … 187 190 if [ ${svn_forge} -eq 1 ] 188 191 then 189 if [ "${loginforgeipsl}" = "" ]190 then191 echo "${command} : eee: loginforgeipsl must be defined"192 exit 1193 fi192 if [ "${loginforgeipsl}" = "" ] 193 then 194 echo "${command} : eee: loginforgeipsl must be defined" 195 exit 1 196 fi 194 197 fi 195 198 # … … 199 202 domain=$(nslookup $(hostname) | grep Name: | cut -f 2 | cut -f 2- -d '.') 200 203 case ${domain} in 201 locean-ipsl.upmc.fr)202 tempdir=/usr/temp/${LOGNAME}/203 local_svncfd=1204 ;;205 idris.fr)206 tempdir=${WORKDIR}/207 local_svncfd=0208 ;;204 locean-ipsl.upmc.fr) 205 tempdir=/usr/temp/${LOGNAME}/ 206 local_svncfd=1 207 ;; 208 idris.fr) 209 tempdir=${WORKDIR}/ 210 local_svncfd=0 211 ;; 209 212 *) 210 tempdir=/tmp/${LOGNAME}/211 local_svncfd=1213 tempdir=/tmp/${LOGNAME}/ 214 local_svncfd=1 212 215 ;; 213 216 esac … … 219 222 if [ -d ${tempdir}/for_install_superbib/ ] 220 223 then 221 # If ${tempdir}/for_install_superbib/ exists, we suppose it already222 # contains files.223 if [ ${svn_forge} -eq 1 ]224 then225 # We ask for update this working space226 echo "${command} : iii : ${tempdir}/for_install_superbib/ already exists" 1>> ${log} 2>&1227 echo "iii : You will be asked ${loginforgeipsl}@forge.ipsl.jussieu.fr passwd"228 svn update ${tempdir}/for_install_superbib/229 svn_status=${?}230 if [ ${svn_status} -ne 0 ]231 then232 echo "${command} : eee : pb with svn update forge" 1>> ${log} 2>&1233 echo "${command} : iii : log is ${log}"234 exit 1235 fi236 else237 echo "${command} : iii : no svn forge update is asked" 1>> ${log} 2>&1238 fi224 # If ${tempdir}/for_install_superbib/ exists, we suppose it already 225 # contains files. 226 if [ ${svn_forge} -eq 1 ] 227 then 228 # We ask for update this working space 229 echo "${command} : iii : ${tempdir}/for_install_superbib/ already exists" 1>> ${log} 2>&1 230 echo "iii : You will be asked ${loginforgeipsl}@forge.ipsl.jussieu.fr passwd" 231 svn update ${tempdir}/for_install_superbib/ 232 svn_status=${?} 233 if [ ${svn_status} -ne 0 ] 234 then 235 echo "${command} : eee : pb with svn update forge" 1>> ${log} 2>&1 236 echo "${command} : iii : log is ${log}" 237 exit 1 238 fi 239 else 240 echo "${command} : iii : no svn forge update is asked" 1>> ${log} 2>&1 241 fi 239 242 else 240 mkdir -p ${tempdir}/for_install_superbib/241 if [ ${svn_forge} -eq 1 ]242 then243 # If ${tempdir}/for_install_superbib/ does not exist, we checkout244 # files245 echo "iii : You will be asked ${loginforgeipsl}@forge.ipsl.jussieu.fr passwd"246 svn checkout svn+ssh://${loginforgeipsl}@forge.ipsl.jussieu.fr/ipsl/forge/projets/${project}/svn/trunk/ ${tempdir}/for_install_superbib/ 1>> ${log} 2>&1247 svn_status=${?}248 if [ ${svn_status} -ne 0 ]249 then250 echo "${command} : eee : pb with svn forge" 1>> ${log} 2>&1251 echo "${command} : iii : log is ${log}"252 exit 1253 fi254 else255 echo "${command} : iii : no svn forge checkout is asked" 1>> ${log} 2>&1256 fi243 mkdir -p ${tempdir}/for_install_superbib/ 244 if [ ${svn_forge} -eq 1 ] 245 then 246 # If ${tempdir}/for_install_superbib/ does not exist, we checkout 247 # files 248 echo "iii : You will be asked ${loginforgeipsl}@forge.ipsl.jussieu.fr passwd" 249 svn checkout svn+ssh://${loginforgeipsl}@forge.ipsl.jussieu.fr/ipsl/forge/projets/${project}/svn/trunk/ ${tempdir}/for_install_superbib/ 1>> ${log} 2>&1 250 svn_status=${?} 251 if [ ${svn_status} -ne 0 ] 252 then 253 echo "${command} : eee : pb with svn forge" 1>> ${log} 2>&1 254 echo "${command} : iii : log is ${log}" 255 exit 1 256 fi 257 else 258 echo "${command} : iii : no svn forge checkout is asked" 1>> ${log} 2>&1 259 fi 257 260 fi 258 261 #
Note: See TracChangeset
for help on using the changeset viewer.