From b9fd356e6de28682155e47a0732114d4afc9f8e5 Mon Sep 17 00:00:00 2001 From: Matthew Stanley <1379tech@gmail.com> Date: Tue, 25 Aug 2026 21:01:59 -0700 Subject: [PATCH] packaging: tolerate empty runtime dir lists --- tools/package_setup_host.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/package_setup_host.sh b/tools/package_setup_host.sh index b89c9466..92e3572e 100755 --- a/tools/package_setup_host.sh +++ b/tools/package_setup_host.sh @@ -263,12 +263,16 @@ copy_runtime_dir() { echo "staged runtime dir ${name}/" } -for d in "${RUNTIME_DIRS[@]}"; do - copy_runtime_dir "${d}" 0 -done -for d in "${RUNTIME_DIRS_OPTIONAL[@]}"; do - copy_runtime_dir "${d}" 1 -done +if ((${#RUNTIME_DIRS[@]})); then + for d in "${RUNTIME_DIRS[@]}"; do + copy_runtime_dir "${d}" 0 + done +fi +if ((${#RUNTIME_DIRS_OPTIONAL[@]})); then + for d in "${RUNTIME_DIRS_OPTIONAL[@]}"; do + copy_runtime_dir "${d}" 1 + done +fi copy_proj() { local rel="$1"