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
19 if [ "x$NAME" != x ]; then
20 echo "Got name $NAME from IDMETA file"
21 elif test -f debian/control; then
22 NAME=`awk '/Source:/ {print $2}' debian/control`
23 echo "Warning: assuming name $NAME from debian/control"
25 die "No debian/control and no NAME in IDMETA"
28 if [ "x$2" != x ]; then
29 echo "Overriding name $NAME with $2"
33 if [ "x$VERSION" != x ]; then
34 echo "Got version $VERSION from IDMETA file"
36 FULLVERSION=`head -1 $DEBCHANGELOG|sed 's/.*(//g'|sed 's/).*//g'`
37 VERSION=`echo $FULLVERSION|sed 's/-.*//g'`
38 echo "Warning: assuming version $VERSION from $DEBCHANGELOG"
41 if [ "x$1" != x ]; then
42 echo "Overriding version $VERSION with $1"
46 trap 'rm -f tmp.tar' 0
48 if [ -n "$localFiles" ]; then
49 echo "WARNING: using local files rather than git tag" >&2
50 echo "This is fine for testing, but should not be used for releases " >&2
54 cp -a "$dir" $NAME-$VERSION
55 rm -rf $NAME-$VERSION/.git
56 tar cf "$pwd"/tmp.tar $NAME-$VERSION
61 git archive --format=tar --prefix=$NAME-$VERSION/ v${VERSION} > tmp.tar || die "This version is not tagged in Git";
66 for file in debian $OMIT_FROM_DIST; do
67 if [ -e "$file" ]; then
68 echo "Omitting $file from distribution"
69 rm -rf $NAME-$VERSION/$file
72 tar cfz $NAME-$VERSION.tar.gz $NAME-$VERSION