/[MITgcm]/mitgcm.org/scripts/mk_git_tarfile
ViewVC logotype

Diff of /mitgcm.org/scripts/mk_git_tarfile

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7 by jmc, Thu Feb 1 06:48:54 2018 UTC revision 1.8 by jmc, Tue Feb 6 15:43:47 2018 UTC
# Line 78  version_file="$git_code/doc/tag-index" Line 78  version_file="$git_code/doc/tag-index"
78  if test -f $version_file ; then  if test -f $version_file ; then
79    thischkpt=`awk '/^checkpoint/{print $1; exit}' $version_file`    thischkpt=`awk '/^checkpoint/{print $1; exit}' $version_file`
80    short=`echo $thischkpt | sed 's/checkpoint/c/'`    short=`echo $thischkpt | sed 's/checkpoint/c/'`
81    chkptar="MITgcm_$short"    chkptar="MITgcm_${short}.tar"
82    if test -f ../$chkptar.tar.gz ; then    if test -f ../$chkptar.gz ; then
83      echo "tar file ($chkptar) exist for current tag: $thischkpt"      echo "tar file ($chkptar) exist for current tag: $thischkpt"
84    else    else
85      echo -n " ; checkpoint archive file ... "      echo -n 'Creating the checkpoint archive file ... '
86      ( cd $git_code ; git archive --prefix MITgcm/ -o ../$chkptar $thischkpt )      ( cd $git_code ; git archive --prefix MITgcm/ -o ../$chkptar $thischkpt )
87      outp=$?      outp=$?
88      if test $outp != 0 ; then      if test $outp != 0 ; then
# Line 91  if test -f $version_file ; then Line 91  if test -f $version_file ; then
91      else      else
92         echo " Done"         echo " Done"
93      fi      fi
94      gzip $chkptar.tar      gzip -9 $chkptar
95      ls -l $chkptar.tar*      ls -l ${chkptar}*
96      mv $chkptar.tar.gz ..      mv $chkptar.gz ..
97      #-- move previous tar file to backupDir    #-- move previous tar file to backupDir
98      cd ..      cd ..
99      listTar=`ls MITgcm_c*.tar.gz`      listTar=`ls MITgcm_c*.tar.gz`
100      for xx in $listTar ; do      for xx in $listTar ; do
101        if test $xx != $chkptar.tar.gz ; then        if test $xx != $chkptar.gz ; then
102          if test -f other_checkpoints/$xx ; then          if test -f other_checkpoints/$xx ; then
103            echo "error: $backupDir/$xx already exist"            echo "error: $backupDir/$xx already exist"
104          else          else

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22