[41/41] uefi: add judge if folder exist

Submitted by C.R. Guo on Jan. 10, 2019, 8:17 a.m. | Patch ID: 157701

Details

Message ID 1547108119-17949-41-git-send-email-chunrong.guo@nxp.com
State Changes Requested, archived
Delegated to: Daiane Angolini
Headers show

Commit Message

C.R. Guo Jan. 10, 2019, 8:17 a.m.
From: Chunrong Guo <chunrong.guo@nxp.com>

Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
---
 recipes-bsp/uefi/uefi_git.bb | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/recipes-bsp/uefi/uefi_git.bb b/recipes-bsp/uefi/uefi_git.bb
index 4d08782..8b63f50 100644
--- a/recipes-bsp/uefi/uefi_git.bb
+++ b/recipes-bsp/uefi/uefi_git.bb
@@ -11,15 +11,19 @@  SRCREV= "5b259f75decbc478bcab0612d79a58562bef1838"
 S = "${WORKDIR}/git"
 
 do_install () {
-       install -d ${D}/uefi
-       cp -r  ${B}/grub ${D}/uefi
-       cp -r  ${B}/${MACHINE} ${D}/uefi
+       if [ -d ${B}/${MACHINE} ]; then
+           install -d ${D}/uefi
+           cp -r  ${B}/grub ${D}/uefi
+           cp -r  ${B}/${MACHINE} ${D}/uefi
+       fi
 }
 
 do_deploy () {
-       install -d ${DEPLOYDIR}/uefi
-       cp -r  ${B}/grub   ${DEPLOYDIR}/uefi
-       cp -r  ${B}/${MACHINE} ${DEPLOYDIR}/uefi
+       if [ -d ${B}/${MACHINE} ]; then
+           install -d ${DEPLOYDIR}/uefi
+           cp -r  ${B}/grub   ${DEPLOYDIR}/uefi
+           cp -r  ${B}/${MACHINE} ${DEPLOYDIR}/uefi
+       fi
 }
 addtask deploy before do_build after do_install