mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-22 22:40:55 +02:00
properly exit 1 when calling fx_
in a few places, we use the presence of a file found by fx_ to cause an exit, but the command that runs looks something like: exit 1 "string" this yields an error, and a non-zero exit, because of too many arguments to "exit", but we wanted a non-zero exit anyway. nevertheless, this is incorrect. to fix it, eval is used instead. if the never-going-to-exist condition one day exists where exit 1 actually returns, not, you know, exits, we will use err instead, with the string as argument. this should be fine. it's a bit hacky, but so is fx_, and it works. fx_ is used in several places to keep the sloccount down, providing a common way to perform while loops on the output of a command; that is its only purpose.. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+2
-2
@@ -75,8 +75,8 @@ chkvars()
|
|||||||
# e.g. coreboot is multi-tree, so 1
|
# e.g. coreboot is multi-tree, so 1
|
||||||
singletree()
|
singletree()
|
||||||
{
|
{
|
||||||
( fx_ "exit 1" find "config/$1/"*/ -type f -name "target.cfg" ) || \
|
( fx_ "eval exit 1 && err" find "config/$1/"*/ -type f \
|
||||||
return 1
|
-name "target.cfg" ) || return 1; :
|
||||||
}
|
}
|
||||||
|
|
||||||
findpath()
|
findpath()
|
||||||
|
|||||||
+1
-1
@@ -270,7 +270,7 @@ check_defconfig()
|
|||||||
elfcheck()
|
elfcheck()
|
||||||
{
|
{
|
||||||
# TODO: *STILL* very hacky check. do it properly (based on build.list)
|
# TODO: *STILL* very hacky check. do it properly (based on build.list)
|
||||||
( fx_ "exit 1" find "$dest_dir" -type f ) || return 1; :
|
( fx_ "eval exit 1 && err" find "$dest_dir" -type f ) || return 1; :
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_makefile()
|
handle_makefile()
|
||||||
|
|||||||
Reference in New Issue
Block a user