From 1577082435de18d193024ec1a49428226497cb00 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Tue, 16 Aug 2022 20:36:13 -0600 Subject: [PATCH] exit menu and backup if no valid selection --- functions/menu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/menu.sh b/functions/menu.sh index 79993400..5b86ca5f 100644 --- a/functions/menu.sh +++ b/functions/menu.sh @@ -14,7 +14,7 @@ echo "8) Update Applications" echo "9) Command to Container" echo echo "0) Exit" -read -rt 120 -p "Please select an option by number: " selection +read -rt 120 -p "Please select an option by number: " selection || { echo -e "\nFailed to make a selection in time" ; exit; } case $selection in 0) @@ -30,7 +30,7 @@ case $selection in mount ;; 4) - read -rt 120 -p "What is the maximun number of backups you would like?: " number_of_backups || echo "Failed to make a selection" + read -rt 120 -p "What is the maximun number of backups you would like?: " number_of_backups || { echo -e "\nFailed to make a selection in time" ; exit; } backup="true" ;; 5)