summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-07-11 00:28:32 +0100
committerLeah Rowe <leah@libreboot.org>2024-07-11 00:28:32 +0100
commite37779c11db42104408d6c2985d21da679df9c44 (patch)
treece0fc016bd0821a98e4e0e963f35a3b99c832881
parent3263eeb6b67cf2b2290b0c4bd69b298879f1f937 (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>
-rwxr-xr-xscript/trees4
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