From 171133189f74e6a8119c34e07d2f80cb26380d05 Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Thu, 20 Oct 2022 10:58:46 -0700 Subject: [PATCH] Update 'scripts/gitearemove.sh' --- scripts/gitearemove.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/scripts/gitearemove.sh b/scripts/gitearemove.sh index ee21ede..573ea45 100644 --- a/scripts/gitearemove.sh +++ b/scripts/gitearemove.sh @@ -1,13 +1,21 @@ #!/bin/bash -while [ "$go" != 'y' ] && [ "$go" != 'n' ]; do - read -p "Would you like to uninstall Gitea? This is not reversible. (y/n) " go +while true +do + read -r -p "Would you like to uninstall Gitea? This is not reversible. [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 systemctl stop gitea sudo systemctl disable gitea sudo rm -rf /home/git