Changeset 4096 for LMDZ6/trunk/build_gcm


Ignore:
Timestamp:
Mar 14, 2022, 4:28:13 PM (3 years ago)
Author:
lguez
Message:

Add option -force_compile to makelmdz_fcm

Instead of asking the user to answer a question interactively, stop
makelmdz_fcm and inform of the possible use of option
-force_compile. The interactive question risked being hidden in
redirection of standard output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/build_gcm

    r3647 r4096  
    55# the full path to where the 'fcm' command is to be found
    66
    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 ""
     7if [[ -f '.lock' && $force_compile == false ]]
     8then
    159    echo "WARNING: you are probably already compiling the model somewhere else."
    1610    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'
     11    echo "If you are sure that you are not compiling elsewhere,"
     12    echo "run makelmdz_fcm with option -force_compile"
     13    exit 1
    2914fi
     15
     16echo "compiling..." > '.lock'
    3017
    3118job=1
Note: See TracChangeset for help on using the changeset viewer.