diff options
| author | Leah Rowe <leah@libreboot.org> | 2023-09-30 13:21:15 +0100 | 
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2023-09-30 13:22:19 +0100 | 
| commit | 4afa0aaa3c0294cf8e07e7be4022e9c8ea466a86 (patch) | |
| tree | 13ba07bfee398331b6cf4e3d7863f38e9f156663 /script/build/boot | |
| parent | 6125d3418f66cf54c49da780b584945e735d4d73 (diff) | |
build/boot/roms: check all targets before building
If one of them doesn't exist, error out.
Previously, a build would start but then it would
error out later on. This implements the mentality:
fail early, fail hard
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/build/boot')
| -rwxr-xr-x | script/build/boot/roms | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/script/build/boot/roms b/script/build/boot/roms index 9ddbb03e..f80e2a3a 100755 --- a/script/build/boot/roms +++ b/script/build/boot/roms @@ -57,15 +57,23 @@ handle_targets()  	[ "${first}" != "all" ] || boards="$(listitems config/coreboot)" || \  	    err "handle_targets: Cannot get list of boards" +	check_targets +  	for board in ${boards}; do -		[ -d "config/coreboot/${board}/" ] || \ -			err "handle_targets: target not defined: ${board}"  		./build boot roms_helper ${board}${opts} || \  		    err "handle_targets ${board}${opts}: build error"  		[ -d "bin/${board}" ] && targets="${board} ${targets}"  	done  } +check_targets() +{ +	for board in ${boards}; do +		[ -d "config/coreboot/${board}/" ] || \ +			err "check_targets: target not defined: ${board}" +	done +} +  confirm_targets()  {  	[ -z "${targets}" ] && err "No ROM images were compiled." | 
