diskimage-builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir

18 lines
381 B
Plaintext
Raw Normal View History

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
sudo mkdir -p $TMP_MOUNT_PATH/usr/share/pkg-map/
for ELEMENT in $IMAGE_ELEMENT ; do
for DIR in ${ELEMENTS_PATH//:/ }; do
if [ -f "$DIR/$ELEMENT/pkg-map" ]; then
sudo cp "$DIR/$ELEMENT/pkg-map" "$TMP_MOUNT_PATH/usr/share/pkg-map/$ELEMENT"
fi
done
done