[PATCH lkp-tests] fix wget_busybox to check busybox command

10 Oct
2020
10 Oct
'20
9:36 a.m.
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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/wget_busybox.sh b/lib/wget_busybox.sh index bca92606..e239042f 100755 --- a/lib/wget_busybox.sh +++ b/lib/wget_busybox.sh @@ -2,8 +2,14 @@ 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 -- 2.23.0
1599
Age (days ago)
1599
Last active (days ago)
0 comments
1 participants
participants (1)
-
Xiao Shenwei