From 232113e387bf72a569733184d5c036183f74764c Mon Sep 17 00:00:00 2001 From: Jonathan Curran Date: Mon, 1 Jun 2020 22:18:46 -0600 Subject: [PATCH 1/2] Quiet output while downloading in unattended mode --- install.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 72b1cb0..9b13d39 100755 --- a/install.sh +++ b/install.sh @@ -338,12 +338,20 @@ do_download () { if [[ -z "${wget_rc}" ]]; then echo "Downloading ${url}..." - wget --progress=bar "${url}" + if [[ "${RUN_UNATTENDED}" -ne "0" ]]; then + wget -q "${url}" + else + wget --progress=bar "${url}" + fi rc=$? # Or, If curl is around, use that. elif [[ -z "${curl_rc}" ]]; then echo "Downloading ${url}..." - curl --output "${file_name}" --progress-bar "${url}" + if [[ "${RUN_UNATTENDED}" -ne "0" ]]; then + curl -sfL --output "${file_name}" "${url}" + else + curl -fL --output "${file_name}" --progress-bar "${url}" + fi rc=$? # Otherwise, we can't go on. else From 09668af688c891c7cfd32636223c84211287ac60 Mon Sep 17 00:00:00 2001 From: Jonathan Curran Date: Mon, 1 Jun 2020 22:21:41 -0600 Subject: [PATCH 2/2] Curl always reports errors in silent mode --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 9b13d39..5eae1bb 100755 --- a/install.sh +++ b/install.sh @@ -348,7 +348,7 @@ do_download () { elif [[ -z "${curl_rc}" ]]; then echo "Downloading ${url}..." if [[ "${RUN_UNATTENDED}" -ne "0" ]]; then - curl -sfL --output "${file_name}" "${url}" + curl -fsSL --output "${file_name}" "${url}" else curl -fL --output "${file_name}" --progress-bar "${url}" fi