From cdf7bf640152615c820d2b647ec8cd063d4eafe4 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Tue, 26 Jul 2022 16:49:23 -0600 Subject: [PATCH] check for 0 backups --- functions/menu.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/functions/menu.sh b/functions/menu.sh index 90ba29dc..7821c7aa 100644 --- a/functions/menu.sh +++ b/functions/menu.sh @@ -107,6 +107,7 @@ menu(){ echo "Up to how many backups should we keep?" read -rt 600 -p "Please type an integer: " up_backups ! [[ $up_backups =~ ^[0-9]+$ ]] && echo -e "Error: \"$up_backups\" is invalid, it needs to be an integer\nNOT adding it to the list" && sleep 5 && continue + [[ $up_backups == 0 ]] && echo -e "Error: Number of backups cannot be 0\nNOT adding it to the list" && sleep 5 && continue update_selection+=("-b" "$up_backups") elif [[ $current_selection == 2 ]]; then read -rt 600 -p "What is the name of the application we should ignore?: " up_ignore