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"
22 elif test -f $DEBCHANGELOG; then
23 NAME=`head -1 $DEBCHANGELOG|sed 's/ .*//g'`
24 echo "Warning: assuming name $NAME from $DEBCHANGELOG"
26 die "No $DEBCHANGELOG and no NAME in IDMETA"
29 if [ "x$2" != x ]; then
30 echo "Overriding name $NAME with $2"
34 if [ "x$VERSION" != x ]; then
35 echo "Got version $VERSION from IDMETA file"
37 FULLVERSION=`head -1 $DEBCHANGELOG|sed 's/.*(//g'|sed 's/).*//g'`
38 VERSION=`echo $FULLVERSION|sed 's/-.*//g'`
39 echo "Warning: assuming version $VERSION from $DEBCHANGELOG"
42 if [ "x$1" != x ]; then
43 echo "Overriding version $VERSION with $1"
47 trap 'rm -f tmp.tar' 0
49 if [ -n "$localFiles" ]; then
50 echo "WARNING: using local files rather than git tag" >&2
51 echo "This is fine for testing, but should not be used for releases " >&2
55 cp -a "$dir" $NAME-$VERSION
56 rm -rf $NAME-$VERSION/.git
57 tar cf "$pwd"/tmp.tar $NAME-$VERSION
62 git archive --format=tar --prefix=$NAME-$VERSION/ v${VERSION} > tmp.tar || die "This version is not tagged in Git";
67 for file in debian $OMIT_FROM_DIST; do
68 if [ -e "$file" ]; then
69 echo "Omitting $file from distribution"
70 rm -rf $NAME-$VERSION/$file
73 tar cfz $NAME-$VERSION.tar.gz $NAME-$VERSION