diskimage-builder/diskimage_builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir
Ian Wienand 6c077d7c2a Turn down pkg-map and hook copy tracing output
This is a lot of very low value noise in the logs as these iterate
through all the elements (often doing nothing).  Turn it down and add
an echo so we just see what elements it is working on.

Change-Id: I0687de4722766189db9d4a7bd7d3cfb45d387b62
2018-10-18 11:03:17 +11:00

22 lines
497 B
Bash
Executable file

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-1} -gt 1 ]; then
set -x
fi
set -eu
set -o pipefail
sudo mkdir -p $TMP_MOUNT_PATH/usr/share/pkg-map/
eval declare -A image_elements=($(get_image_element_array))
for i in "${!image_elements[@]}"; do
element=$i
element_dir=${image_elements[$i]}
pkg_map="${element_dir}/pkg-map"
if [ -f "${pkg_map}" ]; then
echo "Copying pkg-map for ${element}"
sudo cp "${pkg_map}" "$TMP_MOUNT_PATH/usr/share/pkg-map/$element"
fi
done