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