extract shared pip_create_dump_file from piplib.c and maind.c
[piplib.git] / genversion.sh.in
blobe2227d27f78638835d3f40263e92f68727806f32
1 #! /bin/sh
2 srcdir=@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/GIT_HEAD_ID; then
10 GIT_HEAD_ID=`cat $srcdir/GIT_HEAD_ID`
11 else
12 GIT_HEAD_ID="$PACKAGE-$VERSION-UNKNWON"
15 echo $GIT_HEAD_ID