From 99d69cd2677dfb4a6759659685ee0484caa39fd8 Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Thu, 20 Oct 2022 11:01:17 -0700 Subject: [PATCH] Update 'scripts/mariadbinstall.sh' --- scripts/mariadbinstall.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/mariadbinstall.sh b/scripts/mariadbinstall.sh index ebcbc51..a32e57e 100644 --- a/scripts/mariadbinstall.sh +++ b/scripts/mariadbinstall.sh @@ -1,13 +1,22 @@ #!/bin/bash -while [ "$go" != 'y' ] && [ "$go" != 'n' ]; do - read -p "Would you like to install MariaDB? (y/n) " go +while true +do + read -r -p "Would you like to install MariaDB? [Y/n] " input + + case $input in + [yY][eE][sS]|[yY]) + break + ;; + [nN][oO]|[nN]) + break + ;; + *) + echo "That wasnt an option..." + ;; + esac done -if [ "$go" == 'n' ]; then - exit -fi - apt update && apt upgrade -y sudo apt install wget software-properties-common dirmngr ca-certificates apt-transport-https -y sudo apt install mariadb-server mariadb-client -y