| 51 |
|
|
| 52 |
echo "-- run: \""`basename $0` $*"\" on:" `date` >> $logFile |
echo "-- run: \""`basename $0` $*"\" on:" `date` >> $logFile |
| 53 |
gcmDIR="MITgcm" |
gcmDIR="MITgcm" |
| 54 |
if test -e $gcmDIR/.git/config ; then : ; else |
if test -e $gcmDIR/.git/config ; then |
| 55 |
echo " No current clone ==> get a fresh clone" >> $logFile |
if test ! -f git_Hash ; then |
| 56 |
#rm -f git_Hash prevHash |
echo " Missing file "git_Hash" ==> make one from clone '${gcmDIR}'" >> $logFile |
| 57 |
if test -d $gcmDIR ; then /bin/rm -rf $gcmDIR ; fi |
( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash ) |
| 58 |
git clone https://github.com/$git_repo/${git_code}.git $gcmDIR |
fi |
| 59 |
( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash ) |
else |
| 60 |
|
echo " No current clone ==> get a fresh clone" >> $logFile |
| 61 |
|
#rm -f git_Hash prevHash |
| 62 |
|
if test -d $gcmDIR ; then /bin/rm -rf $gcmDIR ; fi |
| 63 |
|
git clone https://github.com/$git_repo/${git_code}.git $gcmDIR |
| 64 |
|
( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash ) |
| 65 |
fi |
fi |
| 66 |
|
|
| 67 |
#------------------------------------------------------------------------------- |
#------------------------------------------------------------------------------- |