| 77 |
updFile='updated_code' |
updFile='updated_code' |
| 78 |
|
|
| 79 |
#---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
#---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
|
#-- Download/Update reference version of MITgcm code: |
|
| 80 |
if [ $checkOut -ge 1 ] ; then |
if [ $checkOut -ge 1 ] ; then |
| 81 |
|
#-- Download/Update reference version of MITgcm code: |
| 82 |
|
|
| 83 |
if test $srcDIR = $TST_DIR ; then |
if test $srcDIR = $TST_DIR ; then |
| 84 |
echo "cd $TST_DISK ; pwd (x2)" | tee -a $LOG_FIL |
echo "cd $TST_DISK ; pwd (x2)" | tee -a $LOG_FIL |
| 104 |
|
|
| 105 |
if [ $checkOut -eq 1 ] ; then |
if [ $checkOut -eq 1 ] ; then |
| 106 |
if test -e $git_code/.git/config ; then |
if test -e $git_code/.git/config ; then |
| 107 |
|
( cd $git_code ; git checkout master ) | tee -a $LOG_FIL |
| 108 |
echo -n "Updating current clone ( $git_code ) ..." | tee -a $LOG_FIL |
echo -n "Updating current clone ( $git_code ) ..." | tee -a $LOG_FIL |
| 109 |
echo '' >> $LOG_FIL |
echo '' >> $LOG_FIL |
| 110 |
( cd $git_code ; git pull ) >> $LOG_FIL 2>&1 |
( cd $git_code ; git pull ) >> $LOG_FIL 2>&1 |
| 120 |
fi |
fi |
| 121 |
fi |
fi |
| 122 |
if [ $checkOut -eq 2 ] ; then |
if [ $checkOut -eq 2 ] ; then |
| 123 |
|
if test -e $git_code ; then |
| 124 |
|
echo -n " removing dir: $git_code ..." | tee -a $LOG_FIL |
| 125 |
|
rm -rf $git_code |
| 126 |
|
echo " done" | tee -a $LOG_FIL |
| 127 |
|
fi |
| 128 |
echo -n "Make a clone of $git_code from repo: $git_repo ..." | tee -a $LOG_FIL |
echo -n "Make a clone of $git_code from repo: $git_repo ..." | tee -a $LOG_FIL |
| 129 |
git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil |
git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil |
| 130 |
retVal=$? |
retVal=$? |
| 138 |
fi |
fi |
| 139 |
fi |
fi |
| 140 |
#---- making a new working copy: MITgcm_today |
#---- making a new working copy: MITgcm_today |
|
( cd $git_code ; git checkout master ) |
|
| 141 |
rsync -a $git_code/ $srcCode --exclude '.git' |
rsync -a $git_code/ $srcCode --exclude '.git' |
| 142 |
|
ls -ld $srcCode | tee -a $LOG_FIL |
| 143 |
if test -d $srcCode/verification ; then |
if test -d $srcCode/verification ; then |
| 144 |
for exp2add in $addExp ; do |
for exp2add in $addExp ; do |
| 145 |
echo " add dir: $exp2add (from Contrib:verification_other)" | tee -a $LOG_FIL |
echo " add dir: $exp2add (from Contrib:verification_other)" | tee -a $LOG_FIL |
| 153 |
if test -d $srcCode/verification ; then |
if test -d $srcCode/verification ; then |
| 154 |
echo $today > $updFile ; sleep 2 |
echo $today > $updFile ; sleep 2 |
| 155 |
ls -l $updFile | tee -a $LOG_FIL |
ls -l $updFile | tee -a $LOG_FIL |
| 156 |
|
echo '' | tee -a $LOG_FIL |
| 157 |
fi |
fi |
| 158 |
|
|
|
#---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
|
| 159 |
#-- Done with Download/Update of MITgcm code |
#-- Done with Download/Update of MITgcm code |
| 160 |
fi |
fi |
| 161 |
|
#---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
| 162 |
|
|
| 163 |
#-- leave srcDIR and go back to output dir |
#-- leave srcDIR and go back to output dir |
| 164 |
cd $OUT_DIR |
cd $OUT_DIR |