--- mitgcm.org/scripts/mk_git_tarfile 2018/02/25 16:43:19 1.9 +++ mitgcm.org/scripts/mk_git_tarfile 2018/05/05 16:27:10 1.10 @@ -1,6 +1,6 @@ #! /usr/bin/env bash -# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/mk_git_tarfile,v 1.9 2018/02/25 16:43:19 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/mk_git_tarfile,v 1.10 2018/05/05 16:27:10 jmc Exp $ # download the source code from github and make a tar file git_repo='MITgcm'; git_code='MITgcm' @@ -74,9 +74,12 @@ ls -l ${savRepo}* #-- test for new checkpoint -version_file="$git_code/doc/tag-index" + version_file="$git_code/doc/tag-index" +#version_file="$git_code/.git/config" if test -f $version_file ; then thischkpt=`awk '/^checkpoint/{print $1; exit}' $version_file` + #- better way to get latest tag ( but only works with git version 2 ) + #thischkpt=`(cd $git_code ; git tag -l --sort=-authordate | head -n 1 )` short=`echo $thischkpt | sed 's/checkpoint/c/'` chkptar="MITgcm_${short}.tar" if test -f ../$chkptar.gz ; then