source: LMDZ6/branches/Ocean_skin/build_gcm @ 5454

Last change on this file since 5454 was 4368, checked in by lguez, 2 years ago

Sync latest trunk changes to Ocean_skin

  • 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: 996 bytes
RevLine 
[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
[4368]7if [[ -f '.lock' && $force_compile == false ]]
8then
[1755]9    echo "WARNING: you are probably already compiling the model somewhere else."
10    echo "Wait until the first compilation is finished before launching this one."
[4368]11    echo "If you are sure that you are not compiling elsewhere,"
12    echo "run makelmdz_fcm with option -force_compile"
13    exit 1
[1542]14fi
[783]15
[4368]16echo "compiling..." > '.lock'
17
[1802]18job=1
[1755]19dirname="" #path to where the fcm command will be found
20if (( $# >= 1 )) ; then
21  dirname=$1
22  # check that "dirname" exists and is a directory
23  if [[ ! -d $dirname ]] ; then
24    echo "$0 error : $dirname is not a directory"
25    exit
26  fi
27  # add a trailing "/" to $dirname
28  dirname=${dirname}"/"
[1802]29  shift;
[1755]30fi
[783]31
[1755]32# run "fcm build" command
[1802]33${dirname}fcm build $*
[783]34
[4368]35build_command_status=$?
[3798]36
[1755]37# cleanup
[783]38\rm -f '.lock' 
[1542]39
[4368]40exit $build_command_status
41
Note: See TracBrowser for help on using the repository browser.