unified checks for variable initialisation

new function chkvars() does the job

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2024-06-14 13:36:31 +01:00
parent 98724d701b
commit 167e1a0fbe
4 changed files with 14 additions and 14 deletions
+2 -3
View File
@@ -131,7 +131,7 @@ handle_src_tree()
load_project_config "$target_dir"
x_ mkdir -p "$elfdir/$target"
[ -z "$tree" ] && $err "handle_src_tree $project/$tree: tree unset"
chkvars tree
cdir="src/$project/$tree"
if [ ! -d "$cdir" ]; then
@@ -279,8 +279,7 @@ mkpayload_grub()
. "$grubdata/module/$tree" || $err "$tree: !source grub modules"
[ -z "$grub_install_modules" ] && $err "$tree: install modules unset"
[ -z "$grub_modules" ] && $err "$tree: modules unset"
chkvars "grub_install_modules" "grub_modules"
"${cdir}/grub-mkstandalone" --grub-mkimage="${cdir}/grub-mkimage" \
-O i386-coreboot -o "${cdir}/grub.elf" -d "${cdir}/grub-core/" \