Whamcloud - gitweb
LU-1091 fix the tag matching code in configure
authorBrian J. Murrell <brian@whamcloud.com>
Fri, 10 Feb 2012 20:27:04 +0000 (15:27 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 16 Feb 2012 17:22:53 +0000 (12:22 -0500)
Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: I24dd4d0929364a2012afe725586626328ea584c0
Reviewed-on: http://review.whamcloud.com/2131
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
build/autoconf/lustre-build.m4

index 11fdcae..3878359 100644 (file)
@@ -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