From eac18b1c99ca294c5ac8e8585a747f7ea3b6ffeb Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 16 Apr 2016 19:38:11 +0800 Subject: [PATCH] fix compatible for sh --- acme.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/acme.sh b/acme.sh index d1f4e2f1..95870cea 100755 --- a/acme.sh +++ b/acme.sh @@ -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