testing
This commit is contained in:
parent
0fb6383ce5
commit
3d151ed857
@ -50,6 +50,8 @@ menu(){
|
||||
script_path=$(dirname "$script")
|
||||
script_name="heavy_script.sh"
|
||||
cd "$script_path" || exit
|
||||
while true
|
||||
do
|
||||
clear -x
|
||||
title
|
||||
echo "Choose Your Update Type"
|
||||
@ -63,9 +65,39 @@ menu(){
|
||||
if [[ $current_selection == 1 ]]; then
|
||||
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
|
||||
if [[ $up_async == 0 ]]; then
|
||||
echo "Error: \"$up_async\" is less than 1"
|
||||
echo "NOT adding it to the list"
|
||||
sleep 5
|
||||
continue
|
||||
elif ! [[ $up_async =~ ^[0-9]+$ ]]; then
|
||||
echo "Error: \"$up_async\" is invalid, it needs to be an integer"
|
||||
echo "NOT adding it to the list"
|
||||
sleep 5
|
||||
continue
|
||||
else
|
||||
update_selection+=("-U" "$up_async")
|
||||
update_list+=("-U")
|
||||
break
|
||||
fi
|
||||
elif [[ $current_selection == 2 ]]; then
|
||||
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
|
||||
if [[ $up_async == 0 ]]; then
|
||||
echo "Error: \"$up_async\" is less than 1"
|
||||
echo "NOT adding it to the list"
|
||||
sleep 5
|
||||
continue
|
||||
elif ! [[ $up_async =~ ^[0-9]+$ ]]; then
|
||||
echo "Error: \"$up_async\" is invalid, it needs to be an integer"
|
||||
echo "NOT adding it to the list"
|
||||
sleep 5
|
||||
continue
|
||||
else
|
||||
update_selection+=("-u" "$up_async")
|
||||
update_list+=("-u")
|
||||
break
|
||||
fi
|
||||
elif [[ $current_selection == 0 ]]; then
|
||||
echo "Exiting.."
|
||||
exit
|
||||
@ -73,16 +105,7 @@ menu(){
|
||||
echo "$current_selection was not an option, try again"
|
||||
exit
|
||||
fi
|
||||
if [[ $up_async == 0 ]]; then
|
||||
echo "0 was not an option.. exiting"
|
||||
exit
|
||||
elif ! [[ $up_async =~ ^[0-9]+$ ]]; then
|
||||
echo "Error: \"$up_async\" is invalid, it needs to be an integer"
|
||||
exit
|
||||
else
|
||||
update_selection+=("-u" "$up_async")
|
||||
update_list+=("-u")
|
||||
fi
|
||||
done
|
||||
while true
|
||||
do
|
||||
clear -x
|
||||
|
Loading…
Reference in New Issue
Block a user