1#!/bin/sh
23
GVF=GIT-VERSION-FILE
45
VN=$(git-describe --abbrev=4 HEAD 2>/dev/null) || VN=v1.0.GIT
6VN=$(expr "$VN" : v'\(.*\)')
7if test -r $GVF
8then
9VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
10else
11VC=unset
12fi
13test "$VN" = "$VC" || {
14echo >&2 "GIT_VERSION = $VN"
15echo "GIT_VERSION = $VN" >$GVF
16}
1718