echo"1) -U | Update all applications, ignores versions"
echo"2) -u | Update all applications, does not update Major releases"
echo
echo"0) Exit"
echo
read -rt 600 -p "Please type the number associated with the flag above: " current_selection
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")
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")
break
fi
elif[[$current_selection==0]];then
echo"Exiting.."
exit
else
echo"$current_selection was not an option, try again"
exit
fi
done
whiletrue
do
clear -x
title
echo"Choose Your Update Options"
echo"--------------------------"
echo"1) -b | Back-up your ix-applications dataset, specify a number after -b"
echo"2) -i | Add application to ignore list, one by one, see example below."
echo"3) -r | Roll-back applications if they fail to update"
echo"4) -S | Shutdown applications prior to updating"
echo"5) -v | verbose output"
echo"6) -t | Set a custom timeout in seconds when checking if either an App or Mountpoint correctly Started, Stopped or (un)Mounted. Defaults to 500 seconds"
echo"7) -s | sync catalog"
echo"8) -p | Prune unused/old docker images"
echo
echo"0) Done making selections, proceed with update"
echo
echo"Current Choices"
echo"---------------"
echo"bash heavy_script.sh ${update_selection[*]}"
echo
read -rt 600 -p "Please type the number associated with the flag above: " current_selection