| 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 | 
| 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' | 
 export CVSROOT=':pserver:cvsanon@mitgcm.org:/u/gcmpack' | 
| 11 | 
  | 
  | 
| 12 | 
 umask 0002 | 
 umask 0002 | 
| 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=`awk '/^checkpoint/{print $1; exit}' $version_file` | 
     thischkpt=`awk '/^checkpoint/{print $1; exit}' $version_file` | 
| 43 | 
     short=`echo $thischkpt | sed 's/checkpoint/c/'` | 
     short=`echo $thischkpt | sed 's/checkpoint/c/'` | 
| 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 |