]> git.ipfire.org Git - people/ms/strongswan.git/blob - scripts/git-version
os_info: Parse /etc/os-release first
[people/ms/strongswan.git] / scripts / git-version
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 --exclude 'android-*' --tags HEAD 2>/dev/null)
10 fi
11
12 if test -z "$V"; then
13 V="UNKNOWN"
14 fi
15
16 echo $V