2014-05-01 16:13:47 +00:00
|
|
|
#!/bin/bash
|
2014-09-04 04:56:29 +00:00
|
|
|
|
2018-10-17 23:55:07 +00:00
|
|
|
if [ ${DIB_DEBUG_TRACE:-1} -gt 1 ]; then
|
2014-09-04 04:56:29 +00:00
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
set -eu
|
2014-05-01 16:13:47 +00:00
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
sudo mkdir -p $TMP_MOUNT_PATH/usr/share/pkg-map/
|
|
|
|
|
2016-06-29 05:24:57 +00:00
|
|
|
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
|
2018-10-17 23:55:07 +00:00
|
|
|
echo "Copying pkg-map for ${element}"
|
2016-06-29 05:24:57 +00:00
|
|
|
sudo cp "${pkg_map}" "$TMP_MOUNT_PATH/usr/share/pkg-map/$element"
|
|
|
|
fi
|
2014-05-01 16:13:47 +00:00
|
|
|
done
|