version.sh: fix bashisms

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
This commit is contained in:
Oswald Buddenhagen 2009-06-13 14:30:05 +02:00 committed by Sergei Trofimovich
parent 9a5c9cbc88
commit c7ba6209df

View File

@ -21,13 +21,11 @@ src_top_dir=
VERSION_FILE=${src_top_dir}/version.h
pushd ${src_top_dir} &>/dev/null
git_head=$(git rev-parse --verify HEAD 2>/dev/null)
git_head=$(git --git-dir "${src_top_dir}" rev-parse --verify HEAD 2>/dev/null)
[ -z "${git_head}" ] && exit
new_version="$(git describe 2>/dev/null)"
new_version="$(git --git-dir "${src_top_dir}" describe 2>/dev/null)"
[ -z "${new_version}" ] && exit
popd &>/dev/null
saved_version=