summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-08 23:41:24 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-08 23:41:24 +0100
commitff33ec3352babab4c827121099192f014a960c43 (patch)
treec47c1c24c185f55df49c0c4a98f5cb339880e443
parentc2b627dc6d0e6fe10d899fdf301fee6b806ecd50 (diff)
mk: use zero exit instead, to run trees
that way, with set -u -e, we aren't risking some buggy sh implementations from causing an error exit where it shouldn't. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xmk5
1 files changed, 3 insertions, 2 deletions
diff --git a/mk b/mk
index 1a7b896f..af29f1e2 100755
--- a/mk
+++ b/mk
@@ -24,13 +24,14 @@ main()
case "$cmd" in
version) printf "%s\nWebsite: %s\n" "$relname" "$projectsite" ;;
release|download|inject) $cmd "$@" ;;
- -*) return 1 ;;
+ -*) return 0 ;;
*) err "bad command" ;;
esac
set -u -e # some commands disable them. turn them on!
+ return 1
}
-main "$@" && exit 0
+main "$@" || exit 0
. "include/git.sh"
. "include/tree.sh"