Some variables are allowed to exist, but be empty (e.g. $DEVICE_DTB
for QEMU builds.) If the variable is empty, do not attempt to copy.
Change-Id: I89850402a225766496e5c2b5b9a45ffa6ec11815
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
pwd
ls -alhR tmp/deploy/images
-# copy files to $DEST
+# copy files to $DEST (only if variable is non-empty)
for i in DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT; do
- eval cp -avL tmp/deploy/images/${TARGETMACHINE}/$(echo "$"${i}) ${DEST}/
+ FILE=$(eval echo \$${i})
+ if [ -n "$FILE" ]; then
+ cp -avL tmp/deploy/images/${TARGETMACHINE}/${FILE} ${DEST}/
+ fi
done
tree $DEST