diff options
author | Kevin Hilman <khilman@baylibre.com> | 2017-07-19 00:20:07 +0000 |
---|---|---|
committer | Kevin Hilman <khilman@baylibre.com> | 2017-07-19 00:20:09 +0000 |
commit | 13ad0bcde55d095fd0611881841627a55c3211a3 (patch) | |
tree | 27b7cbec69b6d8253b9bf8aa9116b70c95e928ef /jjb/common/include-agl-run-test-rsync-changeid.sh | |
parent | c358eb42ebbc5128bc6a0d5228e0bea08e8bc882 (diff) |
jjb/common: run-test-rsync: fix empty variables
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>
Diffstat (limited to 'jjb/common/include-agl-run-test-rsync-changeid.sh')
-rw-r--r-- | jjb/common/include-agl-run-test-rsync-changeid.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/jjb/common/include-agl-run-test-rsync-changeid.sh b/jjb/common/include-agl-run-test-rsync-changeid.sh index 64165553..be3f68bb 100644 --- a/jjb/common/include-agl-run-test-rsync-changeid.sh +++ b/jjb/common/include-agl-run-test-rsync-changeid.sh @@ -25,9 +25,12 @@ cd output 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 |