version.sh: unbreak version.h generation (--git-dir needs path to bare repo)

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
This commit is contained in:
Sergei Trofimovich 2009-06-16 20:33:24 +03:00
parent a1864899d2
commit 3e81dd57c1

View File

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