source: LMDZ5/branches/testing/build_gcm @ 5371

Last change on this file since 5371 was 1910, checked in by Laurent Fairhead, 11 years ago

Merged trunk changes r1860:1909 into testing branch

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • 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
RevLine 
[1542]1#!/bin/bash
[1752]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]7if 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?"
[1752]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
[1752]21    if [[ $ouinon == "oui" || $ouinon == "yes" ]] 
[1542]22        then
23        echo OK
24    else
25        exit
26    fi
[783]27else
[1752]28    echo "compiling..." > '.lock'
[1542]29fi
[783]30
[1864]31job=1
[1752]32dirname="" #path to where the fcm command will be found
33if (( $# >= 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"
38    exit
39  fi
40  # add a trailing "/" to $dirname
41  dirname=${dirname}"/"
[1864]42  shift;
[1752]43fi
[783]44
[1752]45# run "fcm build" command
[1864]46${dirname}fcm build $*
[783]47
[1752]48# cleanup
[783]49\rm -f '.lock' 
[1542]50
Note: See TracBrowser for help on using the repository browser.