Whamcloud - gitweb
LU-408 escape [[ in autoconf macros v1_8_6_RC2
authorBrian J. Murrell <brian@whamcloud.com>
Fri, 10 Jun 2011 23:02:19 +0000 (19:02 -0400)
committerJohann Lombardi <johann@whamcloud.com>
Sat, 11 Jun 2011 00:48:11 +0000 (17:48 -0700)
autoconf files use m4 which means [ is meaningful to m4. In order
to escape them, one needs to use [[.

Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: I7601226a0abb8a69e0924c6a8b47b4b0b9feb45a
Reviewed-on: http://review.whamcloud.com/936
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
build/autoconf/lustre-build.m4

index b827114..caf7f0a 100644 (file)
@@ -71,7 +71,7 @@ if git branch >/dev/null 2>&1; then
        # it's tempting to use [[ $ver =~ ^v([0-9]+_)+([0-9]+|RC[0-9]+)$ ]]
        # here but the portability of the regex on the right is dismal
        # (thanx suse)
-       if echo "$ver" | egrep -q "^v([0-9]+_)+([0-9]+|RC[0-9]+)$"; then
+       if echo "$ver" | egrep -q "^v([[0-9]]+_)+([[0-9]]+|RC[[0-9]]+)$"; then
                ver=$(echo $ver | sed -e 's/^v\(.*\)/\1/' \
                                      -e 's/_RC[[0-9]].*$//' -e 's/_/./g')
        fi