summaryrefslogtreecommitdiff
path: root/get_vers.sh
diff options
context:
space:
mode:
Diffstat (limited to 'get_vers.sh')
-rwxr-xr-xget_vers.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/get_vers.sh b/get_vers.sh
new file mode 100755
index 0000000..86de08c
--- /dev/null
+++ b/get_vers.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+top_srcdir=${1:-`pwd`}
+
+if test -f ${top_srcdir}/VERSION; then
+ VERSION=`cat ${top_srcdir}/VERSION`
+elif test -d ${top_srcdir}/.git; then
+ VERSION=`(cd $top_srcdir; git describe)`
+fi
+
+if test -z "$VERSION"; then
+ VERSION='FROM SPACE'
+
+echo $VERSION