This commit is contained in:
Heavybullets8 2022-07-25 16:46:05 -06:00
parent b499b87dc1
commit 749b591c46

View File

@ -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