diff --git a/functions/update_apps.sh b/functions/update_apps.sh index dea780d6..e5691bce 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -1,6 +1,6 @@ #!/bin/bash - +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" @@ -18,7 +18,8 @@ count=0 wait done done - +} +export -f commander update_apps(){ app_name=$(echo "$i" | awk -F ',' '{print $1}') #print out first catagory, name. diff --git a/heavy_script.sh b/heavy_script.sh index 90eb0575..905e50de 100644 --- a/heavy_script.sh +++ b/heavy_script.sh @@ -115,5 +115,5 @@ done [[ "$mount" == "true" ]] && mount && exit [[ "$number_of_backups" -ge 1 ]] && backup [[ "$sync" == "true" ]] && sync -[[ "$update_all_apps" == "true" || "$update_apps" == "true" ]] && update_apps +[[ "$update_all_apps" == "true" || "$update_apps" == "true" ]] && commander [[ "$prune" == "true" ]] && prune \ No newline at end of file