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
# 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