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