From 01eee56fb7b7277691a14db87ec3894dde6050d2 Mon Sep 17 00:00:00 2001 From: Kevin Baensch Date: Wed, 18 Jan 2023 11:01:37 +0100 Subject: [PATCH] Require y/n in setup. --- setup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index b5d4e6f..99e409d 100755 --- a/setup.sh +++ b/setup.sh @@ -16,7 +16,10 @@ then fi check() { - read -r -p "$1" ANSWER + while ! [[ "${ANSWER}" =~ ^[YyNn] ]] + do + read -r -p "$1" ANSWER + done if [[ "${ANSWER}" =~ ^[Yy] ]] then return 0