| 29 |
# cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack' |
# cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack' |
| 30 |
|
|
| 31 |
#- and which GitHub repository to use: |
#- and which GitHub repository to use: |
| 32 |
git_repo='MITgcm' ; git_code='MITgcm' |
git_repo='MITgcm'; git_code='MITgcm' |
| 33 |
# git_repo='altMITgcm' ; git_code='MITgcm66h' |
#git_repo='altMITgcm'; #git_code='MITgcm66h' |
| 34 |
|
|
| 35 |
# checkOut=3 : clone from GitHub and make a new copy (if sepDir) |
# checkOut=3 : clone from GitHub and make a new copy (if sepDir) |
| 36 |
# =2 : update (git pull) repo and make a new copy code (switch to 2 if no repo) |
# =2 : update (git pull) repo and make a new copy code (switch to 2 if no repo) |
| 93 |
cd $tdir |
cd $tdir |
| 94 |
|
|
| 95 |
#---- Making a new clone or updating existing one: |
#---- Making a new clone or updating existing one: |
| 96 |
if test -e MITgcm/.git/config ; then |
if [ $checkOut -eq 2 ] ; then |
| 97 |
echo MITgcm/.git/config 'exist' |
if test -e MITgcm/.git/config ; then |
| 98 |
else |
echo MITgcm/.git/config 'exist' |
| 99 |
echo -n MITgcm/.git/config 'missing ; ' |
else |
| 100 |
checkOut=3 |
echo -n MITgcm/.git/config 'missing ; ' |
| 101 |
echo "will get new clone ( checkOut=$checkOut )" |
checkOut=3 |
| 102 |
|
echo "will get new clone ( checkOut=$checkOut )" |
| 103 |
|
fi |
| 104 |
fi |
fi |
| 105 |
if [ $checkOut -eq 3 ] ; then |
if [ $checkOut -eq 3 ] ; then |
| 106 |
|
test -e $git_code && rm -rf $git_code |
| 107 |
echo -n "Make a clone of $git_code from repo: $git_repo ..." |
echo -n "Make a clone of $git_code from repo: $git_repo ..." |
| 108 |
git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil |
git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil |
| 109 |
retVal=$? |
retVal=$? |
| 119 |
else |
else |
| 120 |
echo "Updating current clone ( $git_code ) ..." |
echo "Updating current clone ( $git_code ) ..." |
| 121 |
( cd $git_code ; git pull ) |
( cd $git_code ; git pull ) |
| 122 |
echo ' --> done!' |
retVal=$? |
| 123 |
|
if test $retVal = 0 ; then |
| 124 |
|
echo ' --> done!' |
| 125 |
|
else |
| 126 |
|
echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit" |
| 127 |
|
exit 3 |
| 128 |
|
fi |
| 129 |
fi |
fi |
| 130 |
|
|
| 131 |
#---- making a new working copy: MITgcm_today |
#---- making a new working copy: MITgcm_today |
| 321 |
|
|
| 322 |
#-- set specific Env Vars: |
#-- set specific Env Vars: |
| 323 |
if test $typ = 'oad' ; then |
if test $typ = 'oad' ; then |
| 324 |
source $HOME/mitgcm/bin/setenv_OpenAD.sh | tee -a $tdir/output_$tt |
#- for some reasons, "source ScriptFile | tee -a LogFile" |
| 325 |
|
# does run the script but does not keep the env-var settings |
| 326 |
|
source $HOME/mitgcm/bin/setenv_OpenAD.sh >> $tdir/output_$tt |
| 327 |
fi |
fi |
| 328 |
if test $typ = 'ifc' ; then |
if test $typ = 'ifc' ; then |
| 329 |
source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64 |
source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64 |