Merge pull request #64 from rstudio/jc-silent

Quiet output while downloading in unattended mode
This commit is contained in:
Jonathan Curran 2020-06-02 14:35:19 -06:00 committed by GitHub
commit a3fa732b05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 -fsSL --output "${file_name}" "${url}"
else
curl -fL --output "${file_name}" --progress-bar "${url}"
fi
rc=$?
# Otherwise, we can't go on.
else