From 487b83d714197d19af09aa78ccd3e75a091d135b Mon Sep 17 00:00:00 2001 From: Cristian Ionescu-Idbohrn Date: Sun, 12 May 2013 11:50:00 +0200 Subject: Escape dots in version string before grep-ing. Less false positives that way. Signed-off-by: Cristian Ionescu-Idbohrn Signed-off-by: Dirk Hohndel --- scripts/check-version | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'scripts') 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:]]+)?\" $f || { + grep $opts -EHio "(VERSION=|subsurface[[:blank:]]+)?\" $f || { [ $release != y ] || sts=1 whine "'$f' may need updating" } -- cgit v1.2.3-70-g09d2