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 echo "No VERSION in IDMETA"
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