Changeset 979 for trunk/LMDZ.COMMON/build_gcm
- Timestamp:
- Jun 5, 2013, 2:41:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/LMDZ.COMMON/build_gcm ΒΆ
r843 r979 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 if [[ -f '.lock' ]] ; then 4 echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs' 5 echo "Attendez que la premiere compilation soit terminee pour relancer la suivante." 6 echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs," 7 echo vous pouvez continuer en repondant oui. 8 echo "Voulez-vous vraiment continuer?" 9 read -p "" answer 10 if [[ $answer != "oui" ]] ; then 7 if test -f '.lock' 8 then 9 echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs' 10 echo "Attendez que la premiere compilation soit terminee pour relancer la suivante." 11 echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs," 12 echo "vous pouvez continuer en repondant oui." 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?" 20 read ouinon 21 if [[ $ouinon == "oui" || $ouinon == "yes" ]] 22 then 23 echo OK 24 else 25 exit 26 fi 27 else 28 echo "compiling..." > '.lock' 29 fi 30 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" 11 37 exit 12 38 fi 13 else14 echo "compilation en cours..." > '.lock'39 # add a trailing "/" to $dirname 40 dirname=${dirname}"/" 15 41 fi 16 42 17 fcm build 43 # run "fcm build" command 44 ${dirname}fcm build 18 45 46 # cleanup 19 47 \rm -f '.lock' 48
Note: See TracChangeset
for help on using the changeset viewer.