diff --git a/build.sh b/build.sh index a597cc5e..256fa8a1 100755 --- a/build.sh +++ b/build.sh @@ -143,11 +143,11 @@ cd "$OMR_TARGET/source" echo "Checking if UEFI patch is set or not" if [ "$OMR_UEFI" = "yes" ] && [ "$OMR_TARGET" = "x86_64" ]; then - if [ ! -f "target/linux/x86/image/startup.nsh" ]; then + if [ -z "$(grep EFI target/linux/x86/image/Makefile)" ]; then patch -N -p1 -s < ../../patches/uefi.patch fi else - if [ -f "target/linux/x86/image/startup.nsh" ]; then + if [ -n "$(grep EFI target/linux/x86/image/Makefile)" ]; then patch -N -R -p1 -s < ../../patches/uefi.patch fi fi