badcmd: don't print "no context given"

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2-merge1
Leah Rowe 2024-06-03 08:26:04 +01:00 committed by Leah Rowe
parent 663de3bab4
commit d21fd016ac
1 changed files with 3 additions and 3 deletions

View File

@ -17,12 +17,12 @@ err="err_"
badcmd()
{
errmsg="no context given"
[ $# -gt 0 ] && errmsg="$1"
errmsg="Bad command"
[ $# -gt 0 ] && errmsg="Bad command ($1)"
dstr="See $projectname build system docs: ${projectsite}docs/maintain/"
[ -d "docs" ] && dstr="$dstr (local docs available via docs/)"
$err "Bad command ($errmsg). $dstr"
$err "$errmsg. $dstr"
}
err_()
{