build/roms: err if -k layout doesn't exist

if the user defines a layout that doesn't exist, throw
an error in lbmk.

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2-merge1
Leah Rowe 2024-01-17 23:22:22 +00:00 committed by Leah Rowe
parent acf3d81ccf
commit 1d4e757253
1 changed files with 2 additions and 0 deletions

View File

@ -152,6 +152,8 @@ build_grub_payload()
[ -f "elf/grub/keymap_$keymap.cfg" ] || printf "keymap %s\n" \
"$keymap" > "elf/grub/keymap_$keymap.cfg" || err "!key"; :
done
[ -z "$_keyboard" ] || [ -f "$grubcfgsdir/keymap/$_keyboard.gkb" ] && \
err "build_grub_payload: $_keyboard layout not defined"
[ -n "$_keyboard" ] && keymaps="${grubcfgsdir}/keymap/${_keyboard}.gkb"
[ -f "$grubelf" ] && return 0
[ -f "src/grub/grub-mkstandalone" ] || x_ ./update trees -b grub