From bbf1f87ee6aa73a11bcb0a3b33fbe7349d20ebcb Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Wed, 13 Apr 2011 17:24:44 +0200 Subject: [PATCH] Fix version parsing. Now working with command $ zsh --version --- tools/require_tool.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/require_tool.sh b/tools/require_tool.sh index 42da2ccf9..1fa77f77a 100755 --- a/tools/require_tool.sh +++ b/tools/require_tool.sh @@ -89,7 +89,7 @@ require_tool () envvar_name=$(echo $1 | tr '[:lower:]' '[:upper:]') tool=$(printenv $envvar_name || echo $1) local version=$($tool --version 2>/dev/null| \ - sed -n 's/.*[^0-9.]\([0-9][0-9.]*\).*/\1/p;q') + sed -n 's/.*[^0-9.]\([0-9]*\.[0-9.]*\).*/\1/p;q') if test x"$version" = x ; then echo "$tool is required" >/dev/stderr return 1