From 6296379a5525eb623b2347536c215c6405b2188a Mon Sep 17 00:00:00 2001 From: robocopAlpha <35454738+robocopAlpha@users.noreply.github.com> Date: Tue, 4 Aug 2020 13:50:33 +0300 Subject: [PATCH] change order of checking shopt nocasematch --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 52a722e..3a41e48 100644 --- a/install.sh +++ b/install.sh @@ -15,14 +15,14 @@ if [ -w /usr/local/bin ]; then brewlog has been installed as $(command -v brewlog). You can start with brewlog --help %s\n" else - curl -sSL 'https://raw.githubusercontent.com/robocopAlpha/brewlog/master/brewlog.sh' >| brewlog.sh - echo "user $(whoami) cannot write to $BREWLOCATION" - read -r -p "use sudo (y/N): " choice shopt -q nocasematch; if [ "$?" -eq "1" ]; then shopt -s nocasematch flag=1 fi + curl -sSL 'https://raw.githubusercontent.com/robocopAlpha/brewlog/master/brewlog.sh' >| brewlog.sh + echo "user $(whoami) cannot write to $BREWLOCATION" + read -r -p "use sudo (y/N): " choice if [[ "$choice" =~ ^(yes|y)$ ]] then sudo mv brewlog.sh $BREWLOCATION/brewlog