6 # First try git-describe, then see if there is a version file
7 # (included in release tarballs), then default
8 if VN=$(git-describe --abbrev=4 HEAD 2>/dev/null); then
9 VN=$(echo "$VN" | sed -e 's/-/./g');
12 VN=$(cat version) || VN="$DEF_VER"
17 VN=$(expr "$VN" : v*'\(.*\)')
19 dirty=$(sh -c 'git-diff-index --name-only HEAD' 2>/dev/null) || dirty=
29 VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
33 test "$VN" = "$VC" || {
34 echo >&2 "GIT_VERSION = $VN"
35 echo "GIT_VERSION = $VN" >$GVF