From 6889284f6b1f0b3cfd0c58bf608e39eda64a250e Mon Sep 17 00:00:00 2001 From: robocopAlpha <35454738+robocopAlpha@users.noreply.github.com> Date: Tue, 4 Aug 2020 13:48:20 +0300 Subject: [PATCH] Installs in the same place as homebrew --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 76b33ab..52a722e 100644 --- a/install.sh +++ b/install.sh @@ -1,16 +1,19 @@ #!/bin/bash BREWLOCATION=$(command -v brew) -echo "$BREWLOCATION/brewlog" if [ "$?" -ne "0" ]; then echo "Homebrew/Linux brew installation not detected in your PATH." exit 1 else - BREWLOCATION= $(dirname "$BREWLOCATION") + BREWLOCATION=$(dirname "$BREWLOCATION") + echo "Determined installation location: $BREWLOCATION/brewlog" fi if [ -w /usr/local/bin ]; then curl -sSL 'https://raw.githubusercontent.com/robocopAlpha/brewlog/master/brewlog.sh' > $BREWLOCATION/brewlog chmod +x $BREWLOCATION/brewlog + printf " +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"