From 79f957f8ac26f296eb19ae69c6343f552736fc0a Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Thu, 28 Jul 2022 23:49:53 -0600 Subject: [PATCH] exit option --- functions/backup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/backup.sh b/functions/backup.sh index ffc90786..9199a560 100644 --- a/functions/backup.sh +++ b/functions/backup.sh @@ -121,7 +121,10 @@ do echo "Choose a restore point" fi echo "$list_backups" + echo + echo "0) Exit" read -rt 120 -p "Please type a number: " selection + [[ $selection == 0 ]] && echo "Exiting.." && exit restore_point=$(echo "$list_backups" | grep ^"$selection)" | awk '{print $2}') #Check for valid selection. If none, kill script if [[ -z "$selection" ]]; then