Commit bbf1f87e authored by Tristan Carel's avatar Tristan Carel
Browse files

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

parent ca4dabb4
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment