exit option for deletebackup

This commit is contained in:
Heavybullets8 2022-07-28 23:51:33 -06:00
parent 79f957f8ac
commit 719e1088af

View File

@ -43,7 +43,10 @@ do
echo -e "Choose a restore point to delete\nThese may be out of order if they are not HeavyScript backups" echo -e "Choose a restore point to delete\nThese may be out of order if they are not HeavyScript backups"
fi fi
echo "$list_backups" echo "$list_backups"
echo
echo "0) Exit"
read -rt 120 -p "Please type a number: " selection read -rt 120 -p "Please type a number: " selection
[[ $selection == 0 ]] && echo "Exiting.." && exit
restore_point=$(echo "$list_backups" | grep ^"$selection)" | awk '{print $2}') restore_point=$(echo "$list_backups" | grep ^"$selection)" | awk '{print $2}')
#Check for valid selection. If none, kill script #Check for valid selection. If none, kill script
if [[ -z "$selection" ]]; then if [[ -z "$selection" ]]; then