| 4 |
|
|
| 5 |
# download the source code and make a tar file |
# download the source code and make a tar file |
| 6 |
|
|
| 7 |
export CVSROOT=/u/gcmpack |
#export CVSROOT=/u/gcmpack |
| 8 |
|
#- to allow users to use cvs update/diff on their untar version of the code, |
| 9 |
|
# switch to pserver method (stored everywhere in the tree in dirs CVS/Root) |
| 10 |
|
export CVSROOT=':pserver:cvsanon@mitgcm.org:/u/gcmpack' |
| 11 |
|
|
| 12 |
umask 0002 |
umask 0002 |
| 13 |
|
|
| 21 |
test -e MITgcm && rm -rf MITgcm |
test -e MITgcm && rm -rf MITgcm |
| 22 |
|
|
| 23 |
echo 'Checking out MITgcm...' |
echo 'Checking out MITgcm...' |
| 24 |
cvs co -P MITgcm > /dev/null 2>&1 |
cvs co -P MITgcm > /dev/null |
| 25 |
#chgrp gcmpack MITgcm |
#chgrp gcmpack MITgcm |
| 26 |
#chmod 775 MITgcm |
#chmod 775 MITgcm |
| 27 |
|
|
| 37 |
#-- test for new checkpoint |
#-- test for new checkpoint |
| 38 |
cd .. |
cd .. |
| 39 |
version_file="daily_snapshot/MITgcm/doc/tag-index" |
version_file="daily_snapshot/MITgcm/doc/tag-index" |
| 40 |
backupDir="other_checkpoints" |
backupDir="other_checkpoints" |
| 41 |
if test -f $version_file ; then |
if test -f $version_file ; then |
| 42 |
thischkpt=`grep '^checkpoint' $version_file | head -1` |
thischkpt=`awk '/^checkpoint/{print $1; exit}' $version_file` |
| 43 |
short=`echo $thischkpt | sed 's/checkpoint/c/'` |
short=`echo $thischkpt | sed 's/checkpoint/c/'` |
| 44 |
chkptar="MITgcm_$short" |
chkptar="MITgcm_$short" |
| 45 |
if test -f $chkptar.tar.gz ; then |
if test -f $chkptar.tar.gz ; then |
| 73 |
for xx in $listTar ; do |
for xx in $listTar ; do |
| 74 |
if test $xx != $chkptar.tar.gz ; then |
if test $xx != $chkptar.tar.gz ; then |
| 75 |
if test -f other_checkpoints/$xx ; then |
if test -f other_checkpoints/$xx ; then |
| 76 |
echo "error: $backupDir/$xx already exist" |
echo "error: $backupDir/$xx already exist" |
| 77 |
else |
else |
| 78 |
echo " mv $xx $backupDir" |
echo " mv $xx $backupDir" |
| 79 |
mv $xx $backupDir |
mv $xx $backupDir |