From 532163e5ba17ac8e94d785b0a3cb60eca5d1f7b9 Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Thu, 20 Oct 2022 11:00:53 -0700 Subject: [PATCH] Update 'scripts/pmainstall.sh' --- scripts/pmainstall.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/pmainstall.sh b/scripts/pmainstall.sh index 6c1f667..21649d6 100644 --- a/scripts/pmainstall.sh +++ b/scripts/pmainstall.sh @@ -1,13 +1,22 @@ #!/bin/bash -while [ "$go" != 'y' ] && [ "$go" != 'n' ]; do - read -p "Would you like to install phpMyAdmin? (y/n) " go +while true +do + read -r -p "Would you like to install phpMyAdmin? [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 - sudo apt update && apt upgrade -y sudo add-apt-repository ppa:ondrej/php && apt install libapache2-mod-php8.1 -y sudo systemtl stop apache2