| 101 |
echo " Update MITgcm code in dir: $gcmDIR using 'git pull':" | tee -a tr_clean_$tt.log |
echo " Update MITgcm code in dir: $gcmDIR using 'git pull':" | tee -a tr_clean_$tt.log |
| 102 |
set -x |
set -x |
| 103 |
#- update the code: |
#- update the code: |
| 104 |
( cd $gcmDIR ; git checkout master ; git pull ) >> tr_clean_$tt.log 2>&1 ; retv=$? |
( cd $gcmDIR ; git pull ) >> tr_clean_$tt.log 2>&1 ; retv=$? |
| 105 |
set +x |
set +x |
| 106 |
if test $retv != 0 ; then |
if test $retv != 0 ; then |
| 107 |
echo "'git pull' in $gcmDIR fail (return val=$retv) => skip" | tee -a tr_clean_$tt.log |
echo "'git pull' in $gcmDIR fail (return val=$retv) => skip" | tee -a tr_clean_$tt.log |
| 108 |
continue |
continue |
| 109 |
fi |
fi |
| 110 |
|
echo " and checkout master:" | tee -a tr_clean_$tt.log |
| 111 |
|
set -x |
| 112 |
|
( cd $gcmDIR ; git checkout master -- . ) >> tr_clean_$tt.log 2>&1 |
| 113 |
|
set +x |
| 114 |
else |
else |
| 115 |
echo "Missing '$gcmDIR/.git/config' or dir '$gcmDIR/verification'" >> tr_clean_$tt.log |
echo "Missing '$gcmDIR/.git/config' or dir '$gcmDIR/verification'" >> tr_clean_$tt.log |
| 116 |
if test -e $gcmDIR ; then |
if test -e $gcmDIR ; then |