diskimage-builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir
Ryan Brady 4178c0c69d Deprecate map-packages, replaced by pkg-map
This patch writes a warning out to stderr to notify element authors
that may be using map-packages to migrate to pkg-map.  This patch
also prints out a warning during image-create that lists the specific
elements that are not using pkg-map.

Change-Id: I7e2a7611dd5650815736ce998aa94a7833193d06
2014-11-19 12:04:12 -05:00

14 lines
326 B
Bash
Executable File

#!/bin/bash
set -eux
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