wget command may link to busybox, if not http_client_cmd=busybox wget
Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com --- lib/wget_busybox.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/wget_busybox.sh b/lib/wget_busybox.sh index bca92606..751b01c3 100755 --- a/lib/wget_busybox.sh +++ b/lib/wget_busybox.sh @@ -2,8 +2,13 @@
setup_wget_busybox() { - wget=$(cmd_path wget) - http_client_cmd="$wget -q" + if has_cmd wget; then + http_client_cmd=$(cmd_path wget) + http_client_cmd="$http_client_cmd -q" && return + fi + + busybox=$(cmd_path busybox) || return + http_client_cmd="$busybox wget -q" }
[ -n "$http_client_cmd" ] || setup_wget_busybox || return