OpenBSD-friendly bld/get-version script

This commit is contained in:
Simon Kelley
2012-02-25 11:31:15 +00:00
parent c5379c1ab6
commit 96f6979c4f

View File

@@ -18,10 +18,10 @@ elif grep '\$Format:%d\$' VERSION >/dev/null 2>&1; then
# unsubstituted VERSION, but no git available. # unsubstituted VERSION, but no git available.
echo UNKNOWN echo UNKNOWN
else else
vers=`cat VERSION | sed 's/[(), ]/\n/ g' | grep $v[0-9] | head -n 1` vers=`cat VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep $v[0-9]`
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo ${vers#v} echo "${vers}" | head -n 1 | tail -c +2
else else
cat VERSION cat VERSION
fi fi