while loop for async check

This commit is contained in:
Heavybullets8 2022-07-29 01:22:59 -06:00
parent 717306e01f
commit 4f303e3489

View File

@ -59,6 +59,8 @@ case $selection in
echo echo
read -rt 600 -p "Please type the number associated with the flag above: " current_selection read -rt 600 -p "Please type the number associated with the flag above: " current_selection
if [[ $current_selection == 1 ]]; then if [[ $current_selection == 1 ]]; then
while true
do
echo -e "\nHow many applications do you want updating at the same time?" echo -e "\nHow many applications do you want updating at the same time?"
read -rt 600 -p "Please type an integer greater than 0: " up_async read -rt 600 -p "Please type an integer greater than 0: " up_async
if [[ $up_async == 0 ]]; then if [[ $up_async == 0 ]]; then
@ -75,7 +77,11 @@ case $selection in
update_selection+=("-U" "$up_async") update_selection+=("-U" "$up_async")
break break
fi fi
done
break
elif [[ $current_selection == 2 ]]; then elif [[ $current_selection == 2 ]]; then
while true
do
echo -e "\nHow many applications do you want updating at the same time?" echo -e "\nHow many applications do you want updating at the same time?"
read -rt 600 -p "Please type an integer greater than 0: " up_async read -rt 600 -p "Please type an integer greater than 0: " up_async
if [[ $up_async == 0 ]]; then if [[ $up_async == 0 ]]; then
@ -92,6 +98,8 @@ case $selection in
update_selection+=("-u" "$up_async") update_selection+=("-u" "$up_async")
break break
fi fi
done
break
elif [[ $current_selection == 0 ]]; then elif [[ $current_selection == 0 ]]; then
echo "Exiting.." echo "Exiting.."
exit exit