summaryrefslogtreecommitdiffstats
path: root/support/download/scp
diff options
context:
space:
mode:
Diffstat (limited to 'support/download/scp')
-rwxr-xr-xsupport/download/scp20
1 files changed, 15 insertions, 5 deletions
diff --git a/support/download/scp b/support/download/scp
index f3e92f3f6e..3d6876ffbc 100755
--- a/support/download/scp
+++ b/support/download/scp
@@ -4,13 +4,23 @@
set -e
# Download helper for scp, to be called from the download wrapper script
-# Expected arguments:
-# $1: output file
-# $2: URL
-# And this environment:
+#
+# Call it as:
+# .../scp [-q] OUT_FILE SRC_URL
+#
+# Environment:
# SCP : the scp 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}"
-${SCP} "${url}" "${output}"
+${SCP} ${verbose} "${url}" "${output}"
OpenPOWER on IntegriCloud