]> git.ipfire.org Git - thirdparty/git.git/blame - GIT-VERSION-GEN
GIT 1.1.0
[thirdparty/git.git] / GIT-VERSION-GEN
CommitLineData
9b88fcef
JH
1#!/bin/sh
2
3GVF=GIT-VERSION-FILE
4
026351a0 5VN=$(git-describe --abbrev=4 HEAD 2>/dev/null) || VN=v1.0.GIT
9b88fcef
JH
6VN=$(expr "$VN" : v'\(.*\)')
7if test -r $GVF
8then
9 VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
10else
11 VC=unset
12fi
13test "$VN" = "$VC" || {
14 echo >&2 "GIT_VERSION = $VN"
15 echo "GIT_VERSION = $VN" >$GVF
16}
17
18