summaryrefslogtreecommitdiffstats
path: root/scripts/check-version
diff options
context:
space:
mode:
authorGravatar Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>2013-05-12 11:50:00 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-12 07:23:51 -0700
commit487b83d714197d19af09aa78ccd3e75a091d135b (patch)
treeebc3ee242b15cc2e97068ae72546923ac220dba4 /scripts/check-version
parent7fcafe9c11d2345a0f048617bb4fa7ee5076dd53 (diff)
downloadsubsurface-487b83d714197d19af09aa78ccd3e75a091d135b.tar.gz
Escape dots in version string before grep-ing.
Less false positives that way. Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/check-version')
-rwxr-xr-xscripts/check-version12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/check-version b/scripts/check-version
index ab98211c6..f036fe2b0 100755
--- a/scripts/check-version
+++ b/scripts/check-version
@@ -64,10 +64,20 @@ case $v in
;;
esac
+saveIFS=$IFS
+IFS=.
+set -- $v
+IFS=$saveIFS
+v=
+while [ $# -gt 0 ]; do
+ v=${v:+$v\\.}$1
+ shift
+done
+
sts=0
whine "checking for version $v"
for f in $files; do
- grep $opts -EHio "(VERSION=|subsurface[[:blank:]]+)?\<v?$v\>" $f || {
+ grep $opts -EHio "(VERSION=|subsurface[[:blank:]]+)?\<v?$v[.0-9]*\>" $f || {
[ $release != y ] || sts=1
whine "'$f' may need updating"
}