/[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.8 by jmc, Tue Feb 6 15:43:47 2018 UTC revision 1.11 by jmc, Tue Apr 2 14:06:06 2019 UTC
# Line 34  fi Line 34  fi
34  #  chgrp gcmpack $git_code  #  chgrp gcmpack $git_code
35     chmod 775 $git_code     chmod 775 $git_code
36    
 rm -rf MITgcm_ss_*  
37  arName='MITgcm_ss_'`date +%Y%m%d`'.tar'  arName='MITgcm_ss_'`date +%Y%m%d`'.tar'
38    fixName=MITgcm_today_snapshot.tar.gz
39    rm -rf MITgcm_ss_* $fixName
40    
41  echo -n 'Creating the archive file ... '  echo -n 'Creating the archive file ... '
42  ( cd $git_code ; git archive --prefix MITgcm/ -o ../$arName master )  ( cd $git_code ; git archive --prefix MITgcm/ -o ../$arName master )
43  gzip -9 $arName   gzip -9 $arName
44  #- should check if successful, it not -> exit 3  #- should check if successful, it not -> exit 3
45  echo 'Done!'  if test -e ${arName}.gz ; then
46       echo 'Done!'
47  #chmod 664 ${arName}.gz    #chmod 664 ${arName}.gz
48  ls -l ${arName}*     ls -l ${arName}* | tee -a $HOME/testing/logs/tar_file_list
49    #- make a link to a fixed name:
50       ln -s ${arName}.gz $fixName
51       ls -l $fixName
52    else
53       echo 'Fail: no gzip archive file!'
54       ls -l ${arName}*
55       exit 3
56    fi
57    
58  #exit  #exit
59  backupDir="other_checkpoints"  backupDir="other_checkpoints"
# Line 74  echo ' Done !' Line 83  echo ' Done !'
83  ls -l ${savRepo}*  ls -l ${savRepo}*
84    
85  #-- test for new checkpoint  #-- test for new checkpoint
86  version_file="$git_code/doc/tag-index"   version_file="$git_code/doc/tag-index"
87    #version_file="$git_code/.git/config"
88  if test -f $version_file ; then  if test -f $version_file ; then
89    thischkpt=`awk '/^checkpoint/{print $1; exit}' $version_file`    thischkpt=`awk '/^checkpoint/{print $1; exit}' $version_file`
90     #- better way to get latest tag ( but only works with git version 2 )
91     #thischkpt=`(cd $git_code ; git tag -l --sort=-authordate | head -n 1 )`
92    short=`echo $thischkpt | sed 's/checkpoint/c/'`    short=`echo $thischkpt | sed 's/checkpoint/c/'`
93    chkptar="MITgcm_${short}.tar"    chkptar="MITgcm_${short}.tar"
94    if test -f ../$chkptar.gz ; then    if test -f ../$chkptar.gz ; then

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

  ViewVC Help
Powered by ViewVC 1.1.22