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}* | tee -a $HOME/testing/logs/tar_file_list |
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" |
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 |