From 84042adec5343ec0c11f27de04e2c089fb9ec0d3 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Fri, 10 Feb 2012 15:27:04 -0500 Subject: [PATCH] LU-1091 fix the tag matching code in configure Signed-off-by: Brian J. Murrell Change-Id: I24dd4d0929364a2012afe725586626328ea584c0 Reviewed-on: http://review.whamcloud.com/2129 Reviewed-by: Minh Diep Tested-by: Hudson Tested-by: Maloo Reviewed-by: Yang Sheng Reviewed-by: Oleg Drokin --- build/autoconf/lustre-build.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/autoconf/lustre-build.m4 b/build/autoconf/lustre-build.m4 index 20e3d0d..0f2427f 100644 --- a/build/autoconf/lustre-build.m4 +++ b/build/autoconf/lustre-build.m4 @@ -61,7 +61,7 @@ BUILDID="" if git branch >/dev/null 2>&1; then ffw=0 hash="" - ver=$(git describe --match v[[0-9]]_*_[[0-9]] --tags) + ver=$(git describe --match v[[0-9]]_*_[[0-9]]* --tags) if [[[ $ver = *-*-* ]]]; then hash=${ver##*-} ffw=${ver#*-} @@ -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