mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-19 19:23:24 +02:00
mk: condense main() again
i prefer it this way. this reverses the change that i made a few revisions ago Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -21,21 +21,13 @@ eval "`setvars "" vdir src_dirname srcdir mode`"
|
|||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
cmd=""
|
cmd="" && [ $# -gt 0 ] && cmd="$1" && shift 1
|
||||||
if [ $# -gt 0 ]; then
|
|
||||||
cmd="$1"
|
|
||||||
shift 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
version)
|
version) printf "%s\nWebsite: %s\n" "$relname" "$projectsite" ;;
|
||||||
printf "%s\nWebsite: %s\n" "$relname" "$projectsite" ;;
|
release|download|inject) $cmd "$@" ;;
|
||||||
release|download|inject)
|
-*) return 1 ;;
|
||||||
$cmd "$@" ;;
|
*) $err "bad command" ;;
|
||||||
-*)
|
|
||||||
return 1 ;;
|
|
||||||
*)
|
|
||||||
$err "bad command" ;;
|
|
||||||
esac
|
esac
|
||||||
set -u -e # some commands disable them. turn them on!
|
set -u -e # some commands disable them. turn them on!
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user