From 45fe194db0ac91fa8cae6190854141ec1d50c719 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Fri, 11 Jan 2019 03:15:14 +0000 Subject: uefi: add judge if folder exist Signed-off-by: Chunrong Guo --- recipes-bsp/uefi/uefi_git.bb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/recipes-bsp/uefi/uefi_git.bb b/recipes-bsp/uefi/uefi_git.bb index 4d08782b..8b63f501 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 -- cgit v1.2.3-54-g00ecf