| 43 |
#git_repo='altMITgcm'; #git_code='MITgcm66h' |
#git_repo='altMITgcm'; #git_code='MITgcm66h' |
| 44 |
#- other settings: |
#- other settings: |
| 45 |
tmpFil="/tmp/"`basename $0`".$$" |
tmpFil="/tmp/"`basename $0`".$$" |
| 46 |
|
logFile='check_update.log' |
| 47 |
sendCmd='-a jm_c@mitgcm.org' |
sendCmd='-a jm_c@mitgcm.org' |
| 48 |
sendCmd='-send scp -a jm_c@mitgcm.org:testing/MITgcm-test' |
sendCmd='-send scp -a jm_c@mitgcm.org:testing/MITgcm-test' |
| 49 |
|
|
|
gcmDIR="MITgcm" |
|
|
logFile='check_update.log' |
|
| 50 |
echo "-- run: \""`basename $0` $*"\" on:" `date` >> $logFile |
echo "-- run: \""`basename $0` $*"\" on:" `date` >> $logFile |
| 51 |
if test -e $gcmDIR/.git/config -a -f git_Hash ; then |
gcmDIR="MITgcm" |
| 52 |
mv git_Hash prevHash |
if test -e $gcmDIR/.git/config ; then : else |
| 53 |
( cd $gcmDIR ; git pull > /dev/null ) |
echo " No current clone ==> get a fresh clone" >> $logFile |
|
( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash ) |
|
|
else |
|
|
echo " No current clone or missing file "git_Hash" ==> get a fresh clone" >> $logFile |
|
|
rm -f prevHash |
|
| 54 |
if test -d $gcmDIR ; then /bin/rm -rf $gcmDIR ; fi |
if test -d $gcmDIR ; then /bin/rm -rf $gcmDIR ; fi |
| 55 |
git clone https://github.com/$git_repo/${git_code}.git $gcmDIR |
git clone https://github.com/$git_repo/${git_code}.git $gcmDIR |
| 56 |
( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash ) |
( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash ) |
| 77 |
else |
else |
| 78 |
echo " No file 'prevHash' --> will run '$1' set of tests" >> $logFile |
echo " No file 'prevHash' --> will run '$1' set of tests" >> $logFile |
| 79 |
fi |
fi |
| 80 |
|
elif test $1 = gfort ; then |
| 81 |
|
#- to force to skip "tap" test while "gfort" is running: |
| 82 |
|
if test -f prevHash ; then |
| 83 |
|
cp -p prevHash git_Hash |
| 84 |
|
else |
| 85 |
|
cp -p git_Hash prevHash |
| 86 |
|
fi |
| 87 |
fi |
fi |
| 88 |
|
|
| 89 |
echo "run: \""`basename $0` $*"\" on:" `date` |
echo "run: \""`basename $0` $*"\" on:" `date` |
| 105 |
for tt in $tst_list |
for tt in $tst_list |
| 106 |
do |
do |
| 107 |
echo $tt | grep '^tap' > /dev/null 2>&1 ; retv=$? |
echo $tt | grep '^tap' > /dev/null 2>&1 ; retv=$? |
| 108 |
if [ $retv -ne 0 ] ; then |
if [ $retv -ne 0 ] ; then |
| 109 |
echo $tt | grep '^g' > /dev/null 2>&1 ; retv=$? |
echo $tt | grep '^g' > /dev/null 2>&1 ; retv=$? |
| 110 |
fi |
fi |
| 111 |
if [ $retv -eq 0 -a $gfort -ge 1 ] ; then gfort=2 |
if [ $retv -eq 0 -a $gfort -ge 1 ] ; then gfort=2 |
| 417 |
fi |
fi |
| 418 |
|
|
| 419 |
done |
done |
| 420 |
|
|
| 421 |
|
if test $1 = gfort ; then |
| 422 |
|
day=`date +%d` |
| 423 |
|
echo " day in the month='${day}'" |
| 424 |
|
if test $day = 01 -a -f git_Hash ; then |
| 425 |
|
ls -l git_Hash |
| 426 |
|
echo -n ' git_Hash: ' |
| 427 |
|
cat git_Hash |
| 428 |
|
echo "Remove file 'git_Hash' to force tomorrow 'tap' testing" |
| 429 |
|
rm -f git_Hash |
| 430 |
|
fi |
| 431 |
|
fi |