Changeset 1752
- Timestamp:
- Apr 30, 2013, 8:34:06 AM (12 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing/build_gcm
r1542 r1752 1 1 #!/bin/bash 2 # Usage: 3 # ./build_gcm [path] 4 # where 'path' is an optional argument to this script specifying 5 # the full path to where the 'fcm' command is to be found 2 6 3 7 if test -f '.lock' … … 8 12 echo "vous pouvez continuer en repondant oui." 9 13 echo "Voulez-vous vraiment continuer?" 14 echo "" 15 echo "WARNING: you are probably already compiling the model somewhere else." 16 echo "Wait until the first compilation is finished before launching this one." 17 echo "If you are sure that you are not compiling elsewhere, just answer " 18 echo "yes (or 'oui') to the question below to proceed." 19 echo "Do you wish to continue?" 10 20 read ouinon 11 if [[ $ouinon == "oui" ]]21 if [[ $ouinon == "oui" || $ouinon == "yes" ]] 12 22 then 13 23 echo OK … … 16 26 fi 17 27 else 18 echo "compil ation en cours..." > '.lock'28 echo "compiling..." > '.lock' 19 29 fi 20 30 21 #set arch=$1 31 dirname="" #path to where the fcm command will be found 32 if (( $# >= 1 )) ; then 33 dirname=$1 34 # check that "dirname" exists and is a directory 35 if [[ ! -d $dirname ]] ; then 36 echo "$0 error : $dirname is not a directory" 37 exit 38 fi 39 # add a trailing "/" to $dirname 40 dirname=${dirname}"/" 41 fi 22 42 43 # run "fcm build" command 44 ${dirname}fcm build 23 45 24 fcm build 25 46 # cleanup 26 47 \rm -f '.lock' 27 48 -
LMDZ5/branches/testing/makelmdz
r1707 r1752 405 405 echo vous pouvez continuer en repondant oui. 406 406 echo "Voulez-vous vraiment continuer?" 407 echo "" 408 echo "WARNING: you are probably already compiling the model somewhere else." 409 echo "Wait until the first compilation is finished before launching this one." 410 echo "If you are sure that you are not compiling elsewhere, just answer " 411 echo "yes (or 'oui') to the question below to proceed." 412 echo "Do you wish to continue?" 407 413 read reponse 408 if [[ $reponse == "oui" ]]414 if [[ $reponse == "oui" || $reponse == "yes" ]] 409 415 then 410 416 \rm -f $LIBFGCM/grid/dimensions.h -
LMDZ5/branches/testing/makelmdz_fcm
r1707 r1752 158 158 159 159 ############################################################### 160 # mettre le chemin du fcm dans le path160 # path to fcm 161 161 ############################################################### 162 export PATH=${fcm_path}:${PATH} 163 164 echo "Chemin du fcm utlise :" 165 which fcm 162 # handle case when provided path to fcm was given as a relative 163 # path (from makelmdz_fcm script directory) and not an absolute path 164 if [[ ${fcm_path:0:1} != "/" ]] ; then 165 # prepend with makelmdz_fcm location 166 fcm_path=$(cd $(dirname $0) ; pwd)"/"${fcm_path} 167 fi 168 169 echo "Path to fcm:" 170 echo ${fcm_path} 166 171 167 172 ############################################################### … … 291 296 echo vous pouvez continuer en repondant oui. 292 297 echo "Voulez-vous vraiment continuer?" 298 echo "" 299 echo "WARNING: you are probably already compiling the model somewhere else." 300 echo "Wait until the first compilation is finished before launching this one." 301 echo "If you are sure that you are not compiling elsewhere, just answer " 302 echo "yes (or 'oui') to the question below to proceed." 303 echo "Do you wish to continue?" 293 304 read reponse 294 if [[ $reponse == "oui" ]]305 if [[ $reponse == "oui" || $reponse == "yes" ]] 295 306 then 296 307 \rm -f $LIBFGCM/grid/dimensions.h … … 433 444 434 445 rm -f $LIBOGCM/${arch}${SUFF_NAME}/.config/fcm.bld.lock 435 ./build_gcm 446 ./build_gcm ${fcm_path} 436 447 437 448 rm -rf tmp_src
Note: See TracChangeset
for help on using the changeset viewer.