From 3ef9925b56a09d2dfbca54946fcd517fe80b787b Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 19 Jun 2024 14:11:54 +0100 Subject: [PATCH] roms: reduce indentation in build_grub_roms() Signed-off-by: Leah Rowe --- script/roms | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/script/roms b/script/roms index a91b1da..29cdc4b 100755 --- a/script/roms +++ b/script/roms @@ -228,16 +228,13 @@ build_grub_roms() [ "$initmode" = "normal" ] && newrom="$romdir/${payload1}_" \ && newrom="$newrom${board}_$initmode.rom" cprom cp "$tmprom" "$newrom" - if [ "$payload_seabios_withgrub" = "y" ] && \ - [ "$payload1" != "grub" ]; then - cbfs "$tmprom" "$grubdata/bootorder" bootorder raw - cprom cp "$tmprom" "${newrom%.rom}_grubfirst.rom" - if [ "$payload_seabios_grubonly" = "y" ]; then - x_ "$cbfstool" "$tmprom" add-int -i 0 \ - -n etc/show-boot-menu - cprom cp "$tmprom" "${newrom%.rom}_grubonly.rom" - fi - fi + + [ "$payload1" = "grub" ] && return 0 + cbfs "$tmprom" "$grubdata/bootorder" bootorder raw + cprom cp "$tmprom" "${newrom%.rom}_grubfirst.rom" + [ "$payload_seabios_grubonly" = "y" ] && return 0 + x_ "$cbfstool" "$tmprom" add-int -i 0 -n etc/show-boot-menu + cprom cp "$tmprom" "${newrom%.rom}_grubonly.rom" } # make a rom in /tmp/ and then print the path of that ROM