From c562e2b7d3be93cae562fe9255dc1e91c61695d1 Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Thu, 20 Oct 2022 10:59:42 -0700 Subject: [PATCH] Update 'scripts/gitlabinstall.sh' --- scripts/gitlabinstall.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/scripts/gitlabinstall.sh b/scripts/gitlabinstall.sh index bdc1971..77b7f37 100644 --- a/scripts/gitlabinstall.sh +++ b/scripts/gitlabinstall.sh @@ -1,13 +1,21 @@ #!/bin/bash -while [ "$go" != 'y' ] && [ "$go" != 'n' ]; do - read -p "Would you like to install Gitlab? (y/n) " go +while true +do + read -r -p "Would you like to install Gitlab? [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 apt install tzdata curl ca-certificates openssh-server -y gpg_key_url="https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey"