3c6972a5c0
There are a couple of loops identified here that output a lot of tracing each iteration for little value. Make them only trace at higher levels (-x -x and above). Points of actual interest within the loops are replaced with an explicit "echo" statement. Additionally, export DIB_DEBUG_TRACE explicitly and in all cases, not just when tracing is turned on. Change-Id: Id710c0b111fc1f5e1ae87fc35f6db28b24867bad
22 lines
525 B
Bash
Executable File
22 lines
525 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-1} -gt 1 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
echo "Copying pkg-map files to $TMP_MOUNT_PATH/usr/share/pkg-map"
|
|
|
|
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
|
|
echo "Deploying pkg-map $DIR/$ELEMENT/pkg-map"
|
|
sudo cp "$DIR/$ELEMENT/pkg-map" \
|
|
"$TMP_MOUNT_PATH/usr/share/pkg-map/$ELEMENT"
|
|
fi
|
|
done
|
|
done
|