Commit eac18b1c authored by neil's avatar neil
Browse files

fix compatible for sh

parent 6f930641
......@@ -62,7 +62,11 @@ _exists() {
_err "Usage: _exists cmd"
return 1
fi
command -v $cmd >/dev/null 2>&1
if type command >/dev/null 2>&1 ; then
command -v $cmd >/dev/null 2>&1
else
type $cmd >/dev/null 2>&1
fi
ret="$?"
_debug2 "$cmd exists=$ret"
return $ret
......
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