Changeset 1752 for LMDZ5/branches


Ignore:
Timestamp:
Apr 30, 2013, 8:34:06 AM (11 years ago)
Author:
Ehouarn Millour
Message:

Add better handling of fcm path from makelmdz_fcm script to build_gcm script; and some translation of output messages to English.
EM

Location:
LMDZ5/branches/testing
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing/build_gcm

    r1542 r1752  
    11#!/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
    26
    37if test -f '.lock'
     
    812    echo "vous pouvez continuer en repondant oui."
    913    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?"
    1020    read ouinon
    11     if [[ $ouinon == "oui" ]]
     21    if [[ $ouinon == "oui" || $ouinon == "yes" ]]
    1222        then
    1323        echo OK
     
    1626    fi
    1727else
    18     echo "compilation en cours..." > '.lock'
     28    echo "compiling..." > '.lock'
    1929fi
    2030
    21 #set arch=$1
     31dirname="" #path to where the fcm command will be found
     32if (( $# >= 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}"/"
     41fi
    2242
     43# run "fcm build" command
     44${dirname}fcm build
    2345
    24 fcm build
    25 
     46# cleanup
    2647\rm -f '.lock'
    2748
  • LMDZ5/branches/testing/makelmdz

    r1707 r1752  
    405405  echo  vous pouvez continuer en repondant oui.
    406406  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?"
    407413  read reponse
    408   if [[ $reponse == "oui" ]]
     414  if [[ $reponse == "oui" || $reponse == "yes" ]]
    409415  then
    410416    \rm -f $LIBFGCM/grid/dimensions.h
  • LMDZ5/branches/testing/makelmdz_fcm

    r1707 r1752  
    158158
    159159###############################################################
    160 # mettre le chemin du fcm dans le path
     160# path to fcm
    161161###############################################################
    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
     164if [[ ${fcm_path:0:1} != "/" ]] ; then
     165  # prepend with makelmdz_fcm location
     166  fcm_path=$(cd $(dirname $0) ; pwd)"/"${fcm_path}
     167fi
     168
     169echo "Path to fcm:"
     170echo ${fcm_path}
    166171
    167172###############################################################
     
    291296  echo  vous pouvez continuer en repondant oui.
    292297  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?"
    293304  read reponse
    294   if [[ $reponse == "oui" ]]
     305  if [[ $reponse == "oui" || $reponse == "yes" ]]
    295306  then
    296307    \rm -f $LIBFGCM/grid/dimensions.h
     
    433444
    434445rm -f $LIBOGCM/${arch}${SUFF_NAME}/.config/fcm.bld.lock
    435 ./build_gcm
     446./build_gcm ${fcm_path}
    436447
    437448rm -rf tmp_src
Note: See TracChangeset for help on using the changeset viewer.