From 8159f55243e79f7107c09047e7d6b9e36f6ababf Mon Sep 17 00:00:00 2001 From: "David Adam (zanchey)" Date: Mon, 2 Sep 2013 20:08:46 +0800 Subject: [PATCH] git version generation fixes - Remove the `version` file created for the tarball after the tarball is finished - Use the builtin type instead of which. --- build_tools/git_version_gen.sh | 2 +- build_tools/make_tarball.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build_tools/git_version_gen.sh b/build_tools/git_version_gen.sh index 5a54eb3be..3ffd0eb2a 100755 --- a/build_tools/git_version_gen.sh +++ b/build_tools/git_version_gen.sh @@ -12,7 +12,7 @@ DEF_VER=2.0.GIT if test -f version then VN=$(cat version) || VN="$DEF_VER" -elif test -d .git -o -f .git && which git >/dev/null +elif test -d .git -o -f .git && type git >/dev/null then VN=$(git describe --tags --dirty 2>/dev/null) else diff --git a/build_tools/make_tarball.sh b/build_tools/make_tarball.sh index 77d78c67e..54398b131 100755 --- a/build_tools/make_tarball.sh +++ b/build_tools/make_tarball.sh @@ -42,6 +42,7 @@ ln -s "$wd" "$prefix" gnutar --append --file="$path" "$prefix"/user_doc/html gnutar --append --file="$path" "$prefix"/share/man gnutar --append --file="$path" "$prefix"/version +rm -f "$prefix"/version rm -f "$prefix" # gzip it