From 59894ed555ecccf0346a7942e208171a21412d9b Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 28 Jul 2024 13:30:25 +0100 Subject: lib.sh: new function mk() to handle trees in bulk single-tree projects cannot be handled in bulk, e.g. ./mk -f project1 project2 project3 that is still the case, from the shell, but internally it is now possible: mk -f project1 project2 project3 mk() is a function that simply handles the given flag, and all projects specified. it does not handle cases without argument, for example you cannot do: mk -f arguments must be provided. it can be used internally, to simplify cases where multiple single-tree projects must be handled, but *also* allows multi-tree projects to be specified, without being able to actually handle trees within that multi-tree project; so for example, you can only specify coreboot, and then it would run on every coreboot tree. Signed-off-by: Leah Rowe --- script/trees | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'script') diff --git a/script/trees b/script/trees index 227b2216..01df28a0 100755 --- a/script/trees +++ b/script/trees @@ -36,9 +36,7 @@ main() project="${OPTARG#src/}"; shift 2 done [ -z "$_f" ] && $err "missing flag (-m/-u/-b/-c/-x/-f/-s/-l/-n)" - [ -z "$project" ] && for p in $(ls -1 config/git); do - ./mk $_f "$p" || $err "!./mk $_f $p"; : - done && return 1 + [ -z "$project" ] && mk $_f $(ls -1 config/git) && return 1 [ -f "config/git/$project/pkg.cfg" ] || $err "'$project' not defined" -- cgit v1.2.1