5 if [ -f $version_file ] ; then
6 git_version=`cat $version_file`
8 if which git > /dev/null; then
9 git_version=`git describe --abbrev=4 HEAD 2>/dev/null`
11 # Is the working tree dirty?
12 if ! git diff-index --quiet --cached HEAD --ignore-submodules || \
13 ! git diff-files --quiet --ignore-submodules ; then
14 git_version="$git_version-dirty"
21 echo "$git_version" | sed -e 's/openafs-[^-]*-//' -e 's/_/./g' | tr -d '\012'