summaryrefslogtreecommitdiff
path: root/support/download/cp
diff options
context:
space:
mode:
authorRomain Perier <romain.perier@free-electrons.com>2016-08-23 14:19:44 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-08-23 14:59:01 +0200
commitff559846fdc11f718ef6ed49c25117fab90b8019 (patch)
tree5e1e019d12268862ed941737025f7a0880356c52 /support/download/cp
parent721e1c1e9ca13f37e3d6aafb0a570fd6fb67fbea (diff)
support/download: Add support to pass options directly to downloaders
This adds support to pass options to the underlying command that is used by downloader. Useful for retrieving data with server-side checking for user login or passwords, use a proxy or use specific options for cloning a repository via git and hg. Signed-off-by: Romain Perier <romain.perier@free-electrons.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/download/cp')
-rwxr-xr-xsupport/download/cp4
1 files changed, 3 insertions, 1 deletions
diff --git a/support/download/cp b/support/download/cp
index 09ce3d110..0ee1f3ba8 100755
--- a/support/download/cp
+++ b/support/download/cp
@@ -28,10 +28,12 @@ shift $((OPTIND-1))
output="${1}"
source="${2}"
+shift 2 # Get rid of our options
+
# Caller needs to single-quote its arguments to prevent them from
# being expanded a second time (in case there are spaces in them)
_localfiles() {
eval ${LOCALFILES} "${@}"
}
-_localfiles ${verbose} "'${source}'" "'${output}'"
+_localfiles ${verbose} "${@}""'${source}'" "'${output}'"