buildrootschalter/support/download/cp
Yann E. MORIN 84469226c1 support/download: convert localfiles to use the wrapper
This drastically simplifies the localfiles helper, as it no longer has
to deal with atomically saving the downloaded archive.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
(Tested by setting BUSYBOX_SITE = file:///tmp and running 'make busybox-source')
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-04 20:12:24 +02:00

17 lines
350 B
Bash
Executable File

#!/bin/bash
# We want to catch any unexpected failure, and exit immediately
set -e
# Download helper for cp, to be called from the download wrapper script
# Expected arguments:
# $1: output file
# $2: source file
# And this environment:
# LOCALFILES: the cp command to call
output="${1}"
source="${2}"
${LOCALFILES} "${source}" "${output}"