Require y/n in setup.

This commit is contained in:
Kevin Baensch 2023-01-18 11:01:37 +01:00
parent d3399944b1
commit 01eee56fb7

View file

@ -16,7 +16,10 @@ then
fi fi
check() { check() {
while ! [[ "${ANSWER}" =~ ^[YyNn] ]]
do
read -r -p "$1" ANSWER read -r -p "$1" ANSWER
done
if [[ "${ANSWER}" =~ ^[Yy] ]] if [[ "${ANSWER}" =~ ^[Yy] ]]
then then
return 0 return 0