From 1351843a7dfcd61c30f04622730fc9087c094bbc Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 25 Jun 2025 19:44:43 +1200 Subject: [PATCH] Modify buildtestpublish_all.sh --- buildtestpublish_all.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/buildtestpublish_all.sh b/buildtestpublish_all.sh index abec964..3dd9164 100755 --- a/buildtestpublish_all.sh +++ b/buildtestpublish_all.sh @@ -120,13 +120,17 @@ function buildtestpublish() { function buildtestpublish_all() { PREVIOUS_DIR=$(pwd) - # find all subdirectories in the current directory that don't begin with a dot - find "$SCRIPT_DIR" -maxdepth 1 -type d \ + # Create array of directories to avoid subshell issues with while loop + local dirs=() + while IFS= read -r -d '' dir; do + dirs+=("$dir") + done < <(find "$SCRIPT_DIR" -maxdepth 1 -type d \ -not -name ".*" \ -not -path "$SCRIPT_DIR" \ - -print0 | while IFS= read -r -d '' dir; \ - do + -print0) + # Process each directory + for dir in "${dirs[@]}"; do buildtestpublish "${dir}" || true # Continue even if one project fails done