From abdc279dbfe3ce91b2081f81a36b5a5cae08f5c9 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Fri, 10 Jun 2011 19:02:19 -0400 Subject: [PATCH] LU-408 escape [[ in autoconf macros 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 Change-Id: I7601226a0abb8a69e0924c6a8b47b4b0b9feb45a Reviewed-on: http://review.whamcloud.com/936 Reviewed-by: Johann Lombardi Tested-by: Hudson --- build/autoconf/lustre-build.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/autoconf/lustre-build.m4 b/build/autoconf/lustre-build.m4 index b827114..caf7f0a 100644 --- a/build/autoconf/lustre-build.m4 +++ b/build/autoconf/lustre-build.m4 @@ -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 -- 1.8.3.1