summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-19 14:11:54 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-19 14:11:54 +0100
commita0da8fdef104a3f47f1427119b00e32b3f21f5a7 (patch)
treee2e81366430b7330e7421a62085f8670effbb01c /script
parent383433d4f60d7777198b8344bc72c7d1fb876403 (diff)
roms: reduce indentation in build_grub_roms()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/roms17
1 files changed, 7 insertions, 10 deletions
diff --git a/script/roms b/script/roms
index 6fb78745..f63d6418 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