File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / strongswan / scripts / git-version
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Wed Mar 17 00:20:15 2021 UTC (3 years, 7 months ago) by misho
CVS tags: MAIN, HEAD
Initial revision

#!/bin/sh

SRCDIR=$1
TARBALL=$SRCDIR/.tarball-git-version

if test -f $TARBALL; then
	V=$(cat $TARBALL)
elif test -d $SRCDIR/.git; then
	V=$(git -C $SRCDIR describe --tags HEAD 2>/dev/null)
fi

if test -z "$V"; then
	V="UNKNOWN"
fi

echo $V

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>