From c1527b6114e94530c50b00ff22ef03ea048e4bd1 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 22 Jun 2024 03:55:04 +0100 Subject: lib.sh: remove badcmd() it's bloat. telling the user to rtfm is something that we already do on irc; they will still ask how to do everything, and ignore the message from badcmd(), or they will automatically know to rtfm. i'm on a massive purge, removing bloat from lbmk as part of Libreboot Build System Audit 6. all bloat must go. Signed-off-by: Leah Rowe --- build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build') diff --git a/build b/build index d3e86519..dbe7487d 100755 --- a/build +++ b/build @@ -21,7 +21,7 @@ err="fail" main() { - [ $# -lt 1 ] && badcmd + [ $# -lt 1 ] && $err "bad command" spath="script/$1" for g in "which git" "git config --global user.name" \ @@ -35,7 +35,7 @@ main() inject) shift 1; vendor_inject $@ ;; download) shift 1; vendor_download $@ ;; *) - [ -f "$spath" ] || badcmd + [ -f "$spath" ] || $err "bad command" shift 1; "$spath" $@ || $err "excmd: $spath $@" ;; esac set -u -e # some commands disable them. turn them on! @@ -60,11 +60,11 @@ mkrelease() vdir="release" while getopts d:m: option; do - [ -z "$OPTARG" ] && badcmd "empty argument not allowed" + [ -z "$OPTARG" ] && $err "empty argument not allowed" case "$option" in d) vdir="$OPTARG" ;; m) mode="$OPTARG" ;; - *) badcmd "invalid option '-$option'" ;; + *) $err "invalid option '-$option'" ;; esac done -- cgit v1.2.1