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