10 VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) || return 1
16 git update-index -q --refresh
17 test -z "$(git diff-index --name-only HEAD --)" ||
24 # First see if there is a version file (included in release tarballs),
25 # then try 'git describe', then default.
28 VN=$(cat version) || VN="$DEF_VER"
29 elif test -d ${GIT_DIR:-.git} -o -f .git && describe
31 VN=$(echo "$VN" | sed -e 's/-/~/g')
36 VN=$(expr "$VN" : v*'\(.*\)')
40 VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
44 test "$VN" = "$VC" && exit
45 echo >&2 "GIT_VERSION = $VN"
46 echo "GIT_VERSION = $VN" >$GVF