diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-09-13 22:45:27 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-09-14 00:05:48 +0100 |
| commit | 5fb0d1098f33a7806ec2a8daba0cd4c4d747562b (patch) | |
| tree | 5e042fa5a3d9ddff451d61595397a391b48b7d46 /include | |
| parent | dcaa15ab01952b9eccfc906b2250721d9d22d891 (diff) | |
mk: simplified command handling
just do includes in mk again. common.sh was stupidly
small, just pointless.
replace the entire command dispatcher with eval, printf
and awk, because i can, and it further reduces sloccount.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/common.sh | 21 | ||||
| -rw-r--r-- | include/lib.sh | 24 |
2 files changed, 0 insertions, 45 deletions
diff --git a/include/common.sh b/include/common.sh deleted file mode 100644 index 9861fc16..00000000 --- a/include/common.sh +++ /dev/null @@ -1,21 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later - -. "include/lib.sh" -. "include/env/init.sh" -. "include/env/get.sh" - -. "include/fw/vendor.sh" -. "include/fw/mrc.sh" -. "include/fw/inject.sh" -. "include/fw/rom.sh" - -. "include/mk/release.sh" - -# tree.sh is included from the main mk script - -xbcommands=" \ -version \ -release \ -download \ -inject \ -" diff --git a/include/lib.sh b/include/lib.sh index 84e23586..fd1b0444 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -191,30 +191,6 @@ x_() "$@" || err "Unhandled error" "x_" "$@" } -xeq() -{ - [ $# -lt 2 ] && \ - err "no args" xeq - - xbcmd="$1" - chk="$2" - shift 2 - - case "$chk" in - -*) - return 1 - ;; - *) - for eq in "$@"; do - [ "$chk" = "$eq" ] && \ - return 0; : - done - ;; - esac - - err "bad command" xeq "$xbcmd" "$chk" "$@" -} - xchk() { if [ $# -lt 3 ]; then |
