From f383b1ad70f6bca76612fb0e8709188a98ed93e1 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 27 Jun 2024 02:36:18 +0100 Subject: trees: only permit one single-tree project the current logic for handling multiple single-tree projects is quite error-prone, and uses recursion. since we don't actually use it this way, remove that feature. the most correct way to do it is with a for loop. 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 38674759..66cc76ef 100755 --- a/script/trees +++ b/script/trees @@ -31,7 +31,7 @@ main() -n) mode="nconfig" ;; *) $err "invalid option '-$option'" ;; esac - shift; project="${OPTARG#src/}"; shift + project="${OPTARG#src/}"; shift 2 done [ -z "$_f" ] && $err "missing flag (-m/-u/-b/-c/-x/-f/-s/-l/-n)" [ -z "$project" ] && $err "project name not specified" @@ -57,8 +57,6 @@ main() build_projects() { - [ $# -gt 0 ] && x_ ./update trees $_f $@ - if [ "$mode" = "fetch" ]; then [ -f "CHANGELOG" ] && return 0 fetch_project_repo; return 0 -- cgit v1.2.1