From 72988798c83a104cc7f0e6e3789e733ca936678c Mon Sep 17 00:00:00 2001 From: bigeagle Date: Wed, 8 Jun 2016 17:39:35 +0800 Subject: [PATCH] apt-download: WGET_OPTION on downloading package Signed-off-by: bigeagle --- helpers/apt-download | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/apt-download b/helpers/apt-download index da5d535..b3eb2ed 100644 --- a/helpers/apt-download +++ b/helpers/apt-download @@ -8,7 +8,7 @@ function check-and-download() { remote_file=$1 local_file=$2 echo "downloading ${remote_file}" - timeout -s INT 300 wget ${WGET_OPTIONS} -q -N -O ${local_file} ${remote_file} || { + timeout -s INT 300 wget ${WGET_OPTIONS:-} -q -N -O ${local_file} ${remote_file} || { rm ${local_file} return 1 } @@ -138,7 +138,7 @@ function apt-download-binary() { while [ $downloaded != true ]; do echo "downloading ${pkg_url} to ${dest_filename}" if [[ -z ${APT_DRY_RUN:-} ]]; then - wget -q -O ${dest_filename} ${pkg_url} && { + wget ${WGET_OPTIONS:-} -q -O ${dest_filename} ${pkg_url} && { echo "${pkg_checksum} ${dest_filename}" | ${checksum_cmd} -c - && downloaded=true # two space for md5sum/sha1sum/sha256sum check format } else