6 if test -f IDMETA; then
9 echo "Warning: no IDMETA file. Limping along anyway" >&2
12 #we will keep this to get the project name
13 DEBCHANGELOG=debian/changelog
15 if [ "x$NAME" != x ]; then
16 echo "Got name $NAME from IDMETA file"
18 NAME=`head -1 $DEBCHANGELOG|sed 's/ .*//g'`
19 echo "Warning: assuming name $NAME from $DEBCHANGELOG"
22 if [ "x$2" != x ]; then
23 echo "Overriding name $NAME with $2"
27 if [ "x$VERSION" != x ]; then
28 echo "Got version $VERSION from IDMETA file"
30 FULLVERSION=`head -1 $DEBCHANGELOG|sed 's/.*(//g'|sed 's/).*//g'`
31 VERSION=`echo $FULLVERSION|sed 's/-.*//g'`
32 echo "Warning: assuming version $VERSION from $DEBCHANGELOG"
35 if [ "x$1" != x ]; then
36 echo "Overriding version $VERSION with $1"
40 trap 'rm -f tmp.tar' 0
41 git archive --format=tar --prefix=$NAME-$VERSION/ v${VERSION} > tmp.tar || die "This version is not tagged in Git";
44 for file in debian $OMIT_FROM_DIST; do
45 echo "Omitting $file from distribution"
46 rm -r $NAME-$VERSION/$file
48 tar cfz $NAME-$VERSION.tar.gz $NAME-$VERSION