6 if [ "x$1" = x-l ]; then
11 if test -f IDMETA; then
14 echo "Warning: no IDMETA file. Limping along anyway" >&2
17 #we will keep this to get the project name
18 DEBCHANGELOG=debian/changelog
20 if [ "x$NAME" != x ]; then
21 echo "Got name $NAME from IDMETA file"
23 NAME=`head -1 $DEBCHANGELOG|sed 's/ .*//g'`
24 echo "Warning: assuming name $NAME from $DEBCHANGELOG"
27 if [ "x$2" != x ]; then
28 echo "Overriding name $NAME with $2"
32 if [ "x$VERSION" != x ]; then
33 echo "Got version $VERSION from IDMETA file"
35 FULLVERSION=`head -1 $DEBCHANGELOG|sed 's/.*(//g'|sed 's/).*//g'`
36 VERSION=`echo $FULLVERSION|sed 's/-.*//g'`
37 echo "Warning: assuming version $VERSION from $DEBCHANGELOG"
40 if [ "x$1" != x ]; then
41 echo "Overriding version $VERSION with $1"
45 trap 'rm -f tmp.tar' 0
47 if [ -n "$localFiles" ]; then
48 echo "WARNING: using local files rather than git tag" >&2
49 echo "This is fine for testing, but should not be used for releases " >&2
53 cp -a "$dir" $NAME-$VERSION
54 rm -rf $NAME-$VERSION/.git
55 tar cf "$pwd"/tmp.tar $NAME-$VERSION
60 git archive --format=tar --prefix=$NAME-$VERSION/ v${VERSION} > tmp.tar || die "This version is not tagged in Git";
65 for file in debian $OMIT_FROM_DIST; do
66 if [ -e "$file" ]; then
67 echo "Omitting $file from distribution"
68 rm -rf $NAME-$VERSION/$file
71 tar cfz $NAME-$VERSION.tar.gz $NAME-$VERSION