diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2012-02-25 11:31:15 +0000 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2012-02-25 11:31:15 +0000 |
commit | 96f6979c4fd11cd1ae7722e3c666e6c95dc3d38c (patch) | |
tree | c371c2e50dcaaf171ec2d608013583ea4c64d3d3 /bld | |
parent | c5379c1ab6c077734d3855dd36e1f45683a291b4 (diff) | |
download | dnsmasq-96f6979c4fd11cd1ae7722e3c666e6c95dc3d38c.tar.gz |
OpenBSD-friendly bld/get-version script
Diffstat (limited to 'bld')
-rwxr-xr-x | bld/get-version | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bld/get-version b/bld/get-version index 6f3f66b..a68b96b 100755 --- a/bld/get-version +++ b/bld/get-version @@ -18,10 +18,10 @@ elif grep '\$Format:%d\$' VERSION >/dev/null 2>&1; then # unsubstituted VERSION, but no git available. echo UNKNOWN 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 - echo ${vers#v} + echo "${vers}" | head -n 1 | tail -c +2 else cat VERSION fi |