Get rid of the warning about ignoring the return value of fgets
[cloog.git] / genversion.sh.in
blob77c04d70478a9439adc369152ea7fd43bab4f60f
1 #! /bin/sh
2 srcdir=@abs_srcdir@
3 PACKAGE=@PACKAGE@
4 VERSION=@VERSION@
6 if test -f $srcdir/.git/HEAD; then
7 GIT_REPO="$srcdir/.git"
8 GIT_HEAD_ID=`GIT_DIR=$GIT_REPO git describe`
9 elif test -f $srcdir/CLOOG_HEAD; then
10 GIT_HEAD_ID=`cat $srcdir/CLOOG_HEAD`
11 else
12 GIT_HEAD_ID="$PACKAGE-$VERSION-UNKNOWN"
15 echo $GIT_HEAD_ID | sed -e 's/cloog-//'