diff options
author | Leah Rowe <leah@libreboot.org> | 2024-07-11 00:28:32 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-07-11 00:28:32 +0100 |
commit | e37779c11db42104408d6c2985d21da679df9c44 (patch) | |
tree | ce0fc016bd0821a98e4e0e963f35a3b99c832881 /script/trees | |
parent | 3263eeb6b67cf2b2290b0c4bd69b298879f1f937 (diff) |
trees: don't continue if no argument given
main() used to be the only function executed from
outside of main(), in this script, but now we source
a config file and then run the build afterward.
when a flag is provided without OPTARG, this means
that we are continuing such action erroneously. to
mitigate this, return 1 in that instance, and handle
it in the line that calls main(), making it exit with
zero status (success).
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/trees')
-rwxr-xr-x | script/trees | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script/trees b/script/trees index c468a1db..f1c0acef 100755 --- a/script/trees +++ b/script/trees @@ -40,7 +40,7 @@ main() ./update trees $_f "$p" || $err "!./update trees $_f $p" [ "$XBMK_RELEASE" != "y" ] || singletree "$p" || \ x_ rm -Rf "src/$p/$p"; continue - done && return 0 + done && return 1 [ -f "config/git/$project/pkg.cfg" ] || $err "'$project' not defined" @@ -253,6 +253,6 @@ copy_elf() done < "$listfile"; x_ make clean -C "$srcdir" } -main $@ +main $@ || exit 0 . "$mkhelpercfg" $cmd |