From 53a7048dc4e7270927db0193b13f4125266e2516 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Mon, 25 Jul 2022 14:16:08 -0600 Subject: [PATCH] global --- functions/update_apps.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions/update_apps.sh b/functions/update_apps.sh index 3d6b125b..a4f3ff49 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -1,13 +1,14 @@ #!/bin/bash +current_updates=0 + commander(){ mapfile -t array < <(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,container_images_update_available,status' | tr -d " \t\r" | grep -E ",true($|,)" | sort) [[ -z $array ]] && echo -e "\nThere are no updates available" && return 0 || echo -e "\n${#array[@]} update(s) available" [[ -z $timeout ]] && echo -e "\nDefault Timeout: 500" && timeout=500 || echo -e "\nCustom Timeout: $timeout" [[ "$timeout" -le 120 ]] && echo "Warning: Your timeout is set low and may lead to premature rollbacks or skips" - update_limit=2 -current_updates=0 + for i in "${array[@]}" do update_apps "$i" &