9 # First see if there is a version file (included in release tarballs),
10 # then try git-describe, then default.
13 VN=$(cat version) || VN="$DEF_VER"
15 VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
21 VN=$(echo "$VN" | sed -e 's/-/./g');
26 VN=$(expr "$VN" : v*'\(.*\)')
28 dirty=$(sh -c 'git diff-index --name-only HEAD' 2>/dev/null) || dirty=
38 VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
42 test "$VN" = "$VC" || {
43 echo >&2 "GIT_VERSION = $VN"
44 echo "GIT_VERSION = $VN" >$GVF