|
|
1.1 misho 1: #!/bin/sh
2:
3: SRCDIR=$1
4: TARBALL=$SRCDIR/.tarball-git-version
5:
6: if test -f $TARBALL; then
7: V=$(cat $TARBALL)
8: elif test -d $SRCDIR/.git; then
9: V=$(git -C $SRCDIR describe --tags HEAD 2>/dev/null)
10: fi
11:
12: if test -z "$V"; then
13: V="UNKNOWN"
14: fi
15:
16: echo $V