From 749b591c46070ae63c583ac3fa09b9749a9c7797 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Mon, 25 Jul 2022 16:46:05 -0600 Subject: [PATCH] test --- functions/update_apps.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/functions/update_apps.sh b/functions/update_apps.sh index a97238ff..23a8eee2 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -9,13 +9,14 @@ mapfile -t array < <(cli -m csv -c 'app chart_release query name,update_availabl update_limit=4 it=0 + while [[ $it -lt ${#array[@]} ]] do jobs=$(jobs -p | wc -l) if [[ "$jobs" -ge "$update_limit" ]]; then sleep 3 else - coproc update_appsfd { update_apps "${array[$it]}" ; } + update_apps "${array[$it]}" processes+=($!) ((it++)) fi @@ -26,10 +27,6 @@ do wait "$proc" done -IFS= read -r -d '' -u "${update_appsfd[0]}" update_output - -echo "$update_output" - } export -f commander @@ -85,7 +82,7 @@ printf '%s\0' "${ignore[@]}" | grep -iFxqz "${app_name}" && echo -e "\n$app_name echo -e "\n$app_name\nMajor Release, update manually" return fi -} +} | sort export -f update_apps