2014-05-01 16:13:47 +00:00
|
|
|
#!/bin/bash
|
2014-09-04 04:56:29 +00:00
|
|
|
|
2017-02-07 04:21:09 +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
|
|
|
|
|
2017-02-07 04:21:09 +00:00
|
|
|
echo "Copying pkg-map files to $TMP_MOUNT_PATH/usr/share/pkg-map"
|
|
|
|
|
2014-05-01 16:13:47 +00:00
|
|
|
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
|
2017-02-07 04:21:09 +00:00
|
|
|
echo "Deploying pkg-map $DIR/$ELEMENT/pkg-map"
|
|
|
|
sudo cp "$DIR/$ELEMENT/pkg-map" \
|
|
|
|
"$TMP_MOUNT_PATH/usr/share/pkg-map/$ELEMENT"
|
2014-05-01 16:13:47 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|