Remove empty tmp.tar if nominated git tag doesn't exist.
authorMike Taylor <mike@indexdata.com>
Fri, 13 Apr 2012 11:40:48 +0000 (12:40 +0100)
committerMike Taylor <mike@indexdata.com>
Fri, 13 Apr 2012 11:40:48 +0000 (12:40 +0100)
id-deb-build/mkdist.sh

index 1dec8ea..4fbee88 100755 (executable)
@@ -37,6 +37,7 @@ if [ "x$1" != x ]; then
   VERSION=$1
 fi
 
+trap 'rm -f tmp.tar' 0
 git archive --format=tar --prefix=$NAME-$VERSION/ v${VERSION} > tmp.tar || die "This version is not tagged in Git";
 tar xf tmp.tar
 rm tmp.tar