Commit 6df5645d authored by Guido Gunther's avatar Guido Gunther Committed by Angus Ainslie (Purism)
Browse files

build-image: Allow to fetch artifacts from the local file system

This can be useful to safe bandwidth. Let's see if we want to support
this in the long run.
parent 2ddf5dac
......@@ -46,8 +46,13 @@ fetch_kernel() {
[ -n "${kernel_url}" ] || { echo "kernel_url not set in board config"; exit 1; }
rm -f files/archive.zip
echo "Fetching kernel from ${kernel_url}"
wget "${JENKINS_AUTH[@]}" -nv --no-glob -Pfiles/ "${kernel_url}"
(cd files/ && unzip -ojq archive.zip)
if [[ "${kernel_url}" =~ https:// ]]; then
wget "${JENKINS_AUTH[@]}" -nv --no-glob -Pfiles/ "${kernel_url}"
(cd files/ && unzip -ojq archive.zip)
else
# shellcheck disable=SC2086
cp ${kernel_url} files/
fi
}
......@@ -57,11 +62,18 @@ fetch_uboot() {
[ -n "${uboot_url}" ] || { echo "uboot_url not set in board config"; exit 1; }
rm -f "${dir}/archive.zip"
echo "Fetching uboot from ${uboot_url}"
wget "${JENKINS_AUTH[@]}" -nv --no-glob -P"${dir}" "${uboot_url}"
(cd "${dir}" && unzip -ojq archive.zip)
if [[ "${kernel_url}" =~ https:// ]]; then
wget "${JENKINS_AUTH[@]}" -nv --no-glob -P"${dir}" "${uboot_url}"
(cd "${dir}" && unzip -ojq archive.zip)
else
mkdir -p "${dir}"
# shellcheck disable=SC2086
cp ${uboot_url} "${dir}/"
fi
}
setup_loop() {
local image="$1"
set -x
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment