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 <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2024-06-22 03:55:04 +01:00
parent fc7ae3e590
commit c1527b6114
4 changed files with 9 additions and 17 deletions
+3 -2
View File
@@ -33,8 +33,9 @@ main()
{
while [ $# -gt 0 ]; do
if [ "$1" = "serprog" ]; then
[ $# -lt 2 ] && badcmd "serprog type not set"
[ "$2" != "rp2040" ] && [ "$2" != "stm32" ] && badcmd
[ $# -lt 2 ] && $err "serprog type not set"
[ "$2" != "rp2040" ] && [ "$2" != "stm32" ] && \
$err "invalid serprog type"
eval "x_ ./update trees -f \"\${${2}src##*/}\""
ser="$2" && shift 2 && continue
fi
+1 -1
View File
@@ -28,7 +28,7 @@ main()
-s) mode="savedefconfig" ;;
-l) mode="olddefconfig" ;;
-n) mode="nconfig" ;;
*) badcmd "invalid option '-$option'" ;;
*) $err "invalid option '-$option'" ;;
esac
shift; project="${OPTARG#src/}"; shift
done