Requires: perl-XML-LibXML-XPathContext
[ZOOM-Perl-moved-to-github.git] / mkdist.sh
1 # Creates a distribution tarball of the kind that Debian packages are
2 # made from.
3 DEBCHANGELOG=debian/changelog
4
5 l=`head -1 $DEBCHANGELOG`
6 NAME=`echo $l|sed 's/ .*//g'`
7 FULLVERSION=`echo $l|sed 's/.*(//g'|sed 's/).*//g'`
8 VERSION=`echo $FULLVERSION|sed 's/-.*//g'`
9
10 git archive --format=tar --prefix=$NAME-$VERSION/ HEAD > $NAME-$VERSION.tar
11 tar xf $NAME-$VERSION.tar
12 rm -r $NAME-$VERSION/{debian,archive,modules}
13 tar cfz $NAME-$VERSION.tar.gz $NAME-$VERSION
14 rm $NAME-$VERSION.tar
15 rm -r $NAME-$VERSION