From 8822c5681578dba7a0cbcf6df8a71c2da1301074 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 10 Sep 2026 18:05:57 +0100 Subject: [PATCH] mk: make it completely generic commands now fed from a file, include/common.sh which in turn also includes other lib files this makes mk completely generic, and means that changes will now be completely in sync with cbmk, ensuring a lack of merge conflicts, though the file was already pretty small anyway. Signed-off-by: Leah Rowe --- include/common.sh | 19 +++++++++++++++++++ mk | 13 ++----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 include/common.sh diff --git a/include/common.sh b/include/common.sh new file mode 100644 index 00000000..89a42073 --- /dev/null +++ b/include/common.sh @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +. "include/lib.sh" +. "include/init.sh" +. "include/vendor.sh" +. "include/mrc.sh" +. "include/inject.sh" +. "include/rom.sh" +. "include/release.sh" +. "include/get.sh" +. "include/chromebook.sh" + +xbcommands=" \ +version \ +release \ +download \ +inject \ +prep_mr_import \ +" diff --git a/mk b/mk index b0a7280a..e99b8f71 100755 --- a/mk +++ b/mk @@ -23,15 +23,7 @@ xbcddir="${xbcddir%/*}" cd "$xbcddir" || exit 1 -. "include/lib.sh" -. "include/init.sh" -. "include/vendor.sh" -. "include/mrc.sh" -. "include/inject.sh" -. "include/rom.sh" -. "include/release.sh" -. "include/get.sh" -. "include/chromebook.sh" +. "include/common.sh" main() { @@ -41,8 +33,7 @@ main() shift 1 fi - if ! xeq main "$cmd" \ - version release download inject prep_mr_import; then + if ! xeq main "$cmd" $xbcommands; then return 0 fi