From bff7ae81d284313be9684c2ef6c06dfe18633845 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 12 Jul 2010 17:14:30 +0100 Subject: [PATCH] New file mkdist.sh, copied from mkadmin/mkdist.sh --- mkdist.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 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 -- 1.7.10.4