Commit 82dc2244 authored by neil's avatar neil
Browse files

fix _exists for busybox

parent e0cd2cdb
......@@ -247,9 +247,12 @@ _exists() {
_usage "Usage: _exists cmd"
return 1
fi
if command >/dev/null 2>&1; then
if eval type type >/dev/null 2>&1; then
eval type "$cmd" >/dev/null 2>&1
elif command >/dev/null 2>&1; then
command -v "$cmd" >/dev/null 2>&1
elif which ls >/dev/null 2>&1; then
elif which which >/dev/null 2>&1; then
which "$cmd" >/dev/null 2>&1
fi
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