]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] make sure both tags and branches work with kit.sh
authorEvan Hunt <each@isc.org>
Mon, 9 Sep 2013 17:34:48 +0000 (10:34 -0700)
committerEvan Hunt <each@isc.org>
Mon, 9 Sep 2013 17:34:48 +0000 (10:34 -0700)
util/kit.sh

index cd0d905c9a348d913f9eadb54d837be33b8095b6..6c6d7f3ed43b6df95d277082017822868898b7ce 100644 (file)
@@ -124,6 +124,13 @@ mkdir $topdir || exit 1
 
 git archive --format=tar $remote $tag | ( cd $topdir; tar xf -)
 shorthash=`git ls-remote $repo refs/heads/$tag | cut -c1-8`
+if [ -z "$shorthash" ]; then
+        shorthash=`git ls-remote $repo refs/tags/$tag | cut -c1-8`
+fi
+if [ -z "$shorthash" ]; then
+        echo "Unable to determine hash for $tag, aborting."
+        exit 1
+fi
 
 cd $topdir || exit 1