91 |
cd $tdir |
cd $tdir |
92 |
|
|
93 |
#---- Making a new clone or updating existing one: |
#---- Making a new clone or updating existing one: |
94 |
if test -e MITgcm/.git/config ; then |
if [ $checkOut -eq 2 ] ; then |
95 |
echo MITgcm/.git/config 'exist' |
if test -e MITgcm/.git/config ; then |
96 |
else |
echo MITgcm/.git/config 'exist' |
97 |
echo -n MITgcm/.git/config 'missing ; ' |
else |
98 |
checkOut=3 |
echo -n MITgcm/.git/config 'missing ; ' |
99 |
echo "will get new clone ( checkOut=$checkOut )" |
checkOut=3 |
100 |
|
echo "will get new clone ( checkOut=$checkOut )" |
101 |
|
fi |
102 |
fi |
fi |
103 |
if [ $checkOut -eq 3 ] ; then |
if [ $checkOut -eq 3 ] ; then |
104 |
|
test -e $git_code && rm -rf $git_code |
105 |
echo -n "Make a clone of $git_code from repo: $git_repo ..." |
echo -n "Make a clone of $git_code from repo: $git_repo ..." |
106 |
git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil |
git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil |
107 |
retVal=$? |
retVal=$? |
117 |
else |
else |
118 |
echo "Updating current clone ( $git_code ) ..." |
echo "Updating current clone ( $git_code ) ..." |
119 |
( cd $git_code ; git pull ) |
( cd $git_code ; git pull ) |
120 |
echo ' --> done!' |
retVal=$? |
121 |
|
if test $retVal = 0 ; then |
122 |
|
echo ' --> done!' |
123 |
|
else |
124 |
|
echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit" |
125 |
|
exit 3 |
126 |
|
fi |
127 |
fi |
fi |
128 |
|
|
129 |
#---- making a new working copy: MITgcm_today |
#---- making a new working copy: MITgcm_today |