From: Mike Taylor Date: Mon, 12 Jul 2010 16:14:30 +0000 (+0100) Subject: New file mkdist.sh, copied from mkadmin/mkdist.sh X-Git-Tag: v1.26~45 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=bff7ae81d284313be9684c2ef6c06dfe18633845;p=ZOOM-Perl-moved-to-github.git New file mkdist.sh, copied from mkadmin/mkdist.sh --- diff --git a/mkdist.sh b/mkdist.sh new file mode 100755 index 0000000..9bcb7ad --- /dev/null +++ b/mkdist.sh @@ -0,0 +1,16 @@ +# Creates a distribution tarball of the kind that Debian packages are +# made from. +DEBCHANGELOG=debian/changelog + +l=`head -1 $DEBCHANGELOG` +NAME=`echo $l|sed 's/ .*//g'` +FULLVERSION=`echo $l|sed 's/.*(//g'|sed 's/).*//g'` +VERSION=`echo $FULLVERSION|sed 's/-.*//g'` + +git archive --format=tar --prefix=$NAME-$VERSION/ HEAD > $NAME-$VERSION.tar +tar xf $NAME-$VERSION.tar +rm -r $NAME-$VERSION/debian +rm -r $NAME-$VERSION/archive +tar cfz $NAME-$VERSION.tar.gz $NAME-$VERSION +rm $NAME-$VERSION.tar +rm -r $NAME-$VERSION