summaryrefslogtreecommitdiffstats
path: root/support/download/wget
diff options
context:
space:
mode:
Diffstat (limited to 'support/download/wget')
-rwxr-xr-xsupport/download/wget20
1 files changed, 15 insertions, 5 deletions
diff --git a/support/download/wget b/support/download/wget
index 6b73726bc0..7eb21a4733 100755
--- a/support/download/wget
+++ b/support/download/wget
@@ -4,13 +4,23 @@
set -e
# Download helper for wget, to be called from the download wrapper script
-# Expected arguments:
-# $1: output file
-# $2: URL
-# And this environment:
+#
+# Call it as:
+# .../wget [-q] OUT_FILE URL
+#
+# Environment:
# WGET : the wget command to call
+verbose=-v
+while getopts :q OPT; do
+ case "${OPT}" in
+ q) verbose=-q;;
+ \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
+ esac
+done
+shift $((OPTIND-1))
+
output="${1}"
url="${2}"
-${WGET} -O "${output}" "${url}"
+${WGET} ${verbose} -O "${output}" "${url}"
OpenPOWER on IntegriCloud