mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
OpenBSD-friendly bld/get-version script
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user