diff options
author | Leah Rowe <leah@libreboot.org> | 2023-11-08 06:31:04 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-11-08 06:34:12 +0000 |
commit | 5af3ae0586ba1f437cecab551ab4fba6fb6bdef1 (patch) | |
tree | 3c7e53042fb78f87da8d7a886ec558993baa54ef /script/update | |
parent | 64f933747021cb783230b9aef367921884ece555 (diff) |
lbmk: don't use status for unconditional returns
in cases where lbmk must always return from a function,
there are some cases where it relies on non-zero exit
status, which in practise is always the case, but may
change in the future if the relevant part is modified
e.g. do_something && return 0
the proper form is:
do_something
return 0
also do this for unconditional exits
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/update')
-rwxr-xr-x | script/update/trees | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/script/update/trees b/script/update/trees index a930bed1..bd0fcb61 100755 --- a/script/update/trees +++ b/script/update/trees @@ -37,8 +37,11 @@ main() [ -z "${_f}" ] && err "missing flag (-m/-u/-b/-c/-x/-f/-s/-l/-n)" [ -z "${project}" ] && err "project name not specified" - [ -f "config/${project}/build.list" ] && build_targets $@ && return 0 - build_projects $@ + if [ -f "config/${project}/build.list" ]; then + build_targets $@ + else + build_projects $@ + fi } build_projects() |