summaryrefslogtreecommitdiff
path: root/get_vers.sh
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@1ts.org>2011-11-25 01:54:33 -0500
committerGravatar Karl Ramm <kcr@1ts.org>2011-11-25 01:55:12 -0500
commit5aec58b8494a6bc47727623dad2353ac7fc27299 (patch)
treeb3c01ac66ded9280e8bbcf28dd1c5087477b3503 /get_vers.sh
parentf276622ace757977fec43633e43577350e0cf6fe (diff)
New version propagation to replace keyword substitution, part 1
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