/[MITgcm]/MITgcm_contrib/test_scripts/ref_machine/setenv_OpenAD.sh
ViewVC logotype

Contents of /MITgcm_contrib/test_scripts/ref_machine/setenv_OpenAD.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Tue Jan 30 15:11:39 2018 UTC (7 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: HEAD
File MIME type: application/x-sh
modified from: MITgcm/tools/example_scripts/ref_machine

1 #! /usr/bin/env bash
2 #
3 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ref_machine/setenv_OpenAD.sh,v 1.1 2017/05/09 00:56:08 jmc Exp $
4 # $Name: $
5
6 ##########################################################
7 # This file is part of OpenAD released under the LGPL. #
8 # The full COPYRIGHT notice can be found in the top #
9 # level directory of the OpenAD distribution #
10 ##########################################################
11
12 # this set some env. vars such as "OPENADROOT"
13 # (needed to generate and use Makefile)
14
15 #./tools/setenv/setenv.py --shell=sh > setenv.tmp~
16 tmp_file="/tmp/setenv_OpenAD.$$"
17 #echo $tmp_file
18
19 s1_file=$HOME/OpenAD/tools/setenv/setenv.py
20 s2_file=/scratch/heimbach/OpenAD/tools/setenv/setenv.py
21 if test -f $s1_file ; then settings=$s1_file
22 elif test -f $s2_file ; then settings=$s2_file
23 else
24 echo "Error: missing file OpenAD/tools/setenv/setenv.py"
25 exit 1
26 fi
27 echo "settings='$settings'"
28
29 $settings --shell=sh > $tmp_file
30 if [ $? -ne 0 ]
31 then
32 echo "Error executing ./tools/setenv/setenv.py --shell=sh > $tmp_file"
33 else
34 source $tmp_file
35 if [ $? -ne 0 ]
36 then
37 echo "Error executing source $tmp_file"
38 else
39 rm -f $tmp_file
40 fi
41 fi

  ViewVC Help
Powered by ViewVC 1.1.22