Browse code

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

Tristan Carel authored on 13/04/2011 at 15:24:44
Showing 1 changed files
... ...
@@ -89,7 +89,7 @@ require_tool ()
89 89
   envvar_name=$(echo $1 | tr '[:lower:]' '[:upper:]')
90 90
   tool=$(printenv $envvar_name || echo $1)
91 91
   local version=$($tool --version 2>/dev/null| \
92
-    sed -n 's/.*[^0-9.]\([0-9][0-9.]*\).*/\1/p;q')
92
+    sed -n 's/.*[^0-9.]\([0-9]*\.[0-9.]*\).*/\1/p;q')
93 93
   if test x"$version" = x ; then
94 94
       echo "$tool is required" >/dev/stderr
95 95
       return 1