Permalink
Browse files

Fix version parsing. Now working with command $ zsh --version

  • Loading branch information...
1 parent ca4dabb commit bbf1f87ee6aa73a11bcb0a3b33fbe7349d20ebcb Tristan Carel committed Apr 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 tools/require_tool.sh
View
@@ -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

0 comments on commit bbf1f87

Please sign in to comment.