Last change
on this file since 1775 was
1755,
checked in by Ehouarn Millour, 12 years ago
|
Updates wich had been made on 'testing' branch (r1752) instead of trunk:
Add better handling of fcm path from makelmdz_fcm script to build_gcm script; and some translation of output messages to English.
EM
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.4 KB
|
Rev | Line | |
---|
[1542] | 1 | #!/bin/bash |
---|
[1755] | 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 |
---|
[783] | 6 | |
---|
[1542] | 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?" |
---|
[1755] | 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?" |
---|
[1542] | 20 | read ouinon |
---|
[1755] | 21 | if [[ $ouinon == "oui" || $ouinon == "yes" ]] |
---|
[1542] | 22 | then |
---|
| 23 | echo OK |
---|
| 24 | else |
---|
| 25 | exit |
---|
| 26 | fi |
---|
[783] | 27 | else |
---|
[1755] | 28 | echo "compiling..." > '.lock' |
---|
[1542] | 29 | fi |
---|
[783] | 30 | |
---|
[1755] | 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 |
---|
[783] | 42 | |
---|
[1755] | 43 | # run "fcm build" command |
---|
| 44 | ${dirname}fcm build |
---|
[783] | 45 | |
---|
[1755] | 46 | # cleanup |
---|
[783] | 47 | \rm -f '.lock' |
---|
[1542] | 48 | |
---|
Note: See
TracBrowser
for help on using the repository browser.