Last change
on this file since 3484 was
3484,
checked in by afalco, 5 weeks ago
|
ICOSA_LMDZ: overall compilation stops when compilation of a module fails.
Errors from internal calls in compilation scripts are transferred to the scripts above.
AF
|
File size:
1.5 KB
|
Rev | Line | |
---|
[843] | 1 | #!/bin/bash |
---|
[979] | 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 |
---|
[1] | 6 | |
---|
[3484] | 7 | if test -f '.lock' |
---|
[979] | 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 |
---|
[3484] | 21 | if [[ $ouinon == "oui" || $ouinon == "yes" ]] |
---|
[979] | 22 | then |
---|
[3484] | 23 | echo OK |
---|
[979] | 24 | else |
---|
| 25 | exit |
---|
| 26 | fi |
---|
| 27 | else |
---|
| 28 | echo "compiling..." > '.lock' |
---|
| 29 | fi |
---|
| 30 | |
---|
[1019] | 31 | job=1 |
---|
[979] | 32 | dirname="" #path to where the fcm command will be found |
---|
| 33 | if (( $# >= 1 )) ; then |
---|
| 34 | dirname=$1 |
---|
| 35 | # check that "dirname" exists and is a directory |
---|
| 36 | if [[ ! -d $dirname ]] ; then |
---|
| 37 | echo "$0 error : $dirname is not a directory" |
---|
[1] | 38 | exit |
---|
[843] | 39 | fi |
---|
[979] | 40 | # add a trailing "/" to $dirname |
---|
| 41 | dirname=${dirname}"/" |
---|
[1019] | 42 | shift; |
---|
[843] | 43 | fi |
---|
[1] | 44 | |
---|
[979] | 45 | # run "fcm build" command |
---|
[1019] | 46 | ${dirname}fcm build $* |
---|
[3484] | 47 | if [ $? != 0 ]; then # check if fcm command worked |
---|
| 48 | exit 1 |
---|
| 49 | fi |
---|
[1] | 50 | |
---|
[3484] | 51 | |
---|
[979] | 52 | # cleanup |
---|
[3484] | 53 | \rm -f '.lock' |
---|
[979] | 54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.