diff options
| author | Leah Rowe <leah@libreboot.org> | 2024-06-14 13:36:31 +0100 | 
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2024-06-14 13:37:03 +0100 | 
| commit | 167e1a0fbe6765aaa5f5d3dc682709aa3c31260b (patch) | |
| tree | 8dde0d22155b438140e3d2e22be8fb4197abe351 /script | |
| parent | 98724d701b10a037e8ffa7ce2864a08993268517 (diff) | |
unified checks for variable initialisation
new function chkvars() does the job
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
| -rwxr-xr-x | script/trees | 5 | 
1 files changed, 2 insertions, 3 deletions
| diff --git a/script/trees b/script/trees index f090f539..a773f03c 100755 --- a/script/trees +++ b/script/trees @@ -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/" \ | 
