summaryrefslogtreecommitdiff
path: root/get_vers.sh
blob: 86de08c2bf05e9a17882a090085a6043b90ce75a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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