Index: utils/trunk/prepare.sh =================================================================== --- utils/trunk/prepare.sh (revision 1712) +++ utils/trunk/prepare.sh (revision 1713) @@ -1,158 +1,158 @@ #!/bin/csh set IN = $PWD set force = 0 set mypackage = applgrid if ( $#argv > 0 ) then if ( "$1" == "--help" ) then - echo "Usage: prepare.sh [--help | --force]" + echo "Usage: prepare.sh [--help | --force | --package ]" exit endif if ( "$1" == "--force" ) then set force = 1 shift endif if ( "x$1" == "x--package" ) then shift if ( $#argv > 0 ) then set mypackage = $1 shift else echo "not enough argments after --package" exit endif endif endif if ( $#argv < 1 ) then # set DIR = `sed -n "s_/trunk__p" .svn/entries` set DIR = `svn info | grep URL | awk '{print $2}' | sed "s_/trunk.*__"` if ( $status != 0 ) then echo "not a working svn repository" exit 1 endif set PACKAGE = ${DIR:t} if ( -e version.dat ) then set VERSION = `cat version.dat` else if ( -e configure.ac ) then set VERSION = `sed -n 's/AC_INIT.*,\(.*\),.*@.*/\1/p' configure.ac` else echo "directory not versioned" exit 1 endif set dir = $PACKAGE-$VERSION set SVNVERSION = `version -s $VERSION` set svndir = $DIR/tags/$PACKAGE-$SVNVERSION echo "version: $SVNVERSION" else set PACKAGE = $1 set VERSION = "" if ( $#argv > 1 ) then set VERSION = `version -t $2` set SVNVERSION = `version -s $2` else cd /tmp set BASE = $PWD echo "checking out $PACKAGE" svn export $SVNROOT/$PACKAGE/trunk $PACKAGE >& /dev/null if ( $status != 0 ) then echo "could not export $PACKAGE/trunk" cd $IN exit 1 endif if ( -e $PACKAGE/version.dat ) then set VERSION = `cat $PACKAGE/version.dat` else if ( -e $PACKAGE/configure.ac ) then set VERSION = `sed -n 's/AC_INIT.*,\(.*\),.*@.*/\1/p' $PACKAGE/configure.ac` else echo "directory not versioned" cd $IN exit 1 endif set SVNVERSION = `version -s $VERSION` mv $PACKAGE{,-$VERSION} cd $BASE endif set dir = $PACKAGE-$VERSION set svndir = $SVNROOT/$PACKAGE/tags/$PACKAGE-$SVNVERSION endif echo svndir $svndir echo "preparing tar archive for $PACKAGE version $VERSION" set DATE = `date "+%Y-%m-%d:%H:%M:%S"` set found = .found-$DATE ssh login.hepforge.org ls $mypackage/downloads/$dir.tgz >& $found set FOUND = `cat $found` rm $found if ( "$force" == 0 && "$FOUND" == "$mypackage/downloads/$dir.tgz" ) then echo "archive already exists" cd $IN exit 1 endif cd /tmp set BASE = $PWD if ( -e $dir ) then mv $dir $dir-$DATE endif svn export $svndir $dir if ( $status != 0 ) then echo "svn tag does not exist" cd $IN exit 1 endif if !( -e $dir/version.dat ) then cd $dir ./configure make dist mv $dir.tar.gz $dir.tgz else # rm $dir/version.dat tar -czf $dir.tgz $dir endif scp $dir.tgz login.hepforge.org:$mypackage/downloads cd $IN