diff --git a/brew/bin/setup.sh b/brew/bin/setup.sh index 026b707a..69fcb57a 100755 --- a/brew/bin/setup.sh +++ b/brew/bin/setup.sh @@ -11,11 +11,12 @@ Darwin*) fi ;; Linux*) - if [ "$LINUXBREW_INSTALL_DIR" != "" ]; then - echo "Start custom installation to $LINUXBREW_INSTALL_DIR" - mkdir -p $LINUXBREW_INSTALL_DIR - pushd $LINUXBREW_INSTALL_DIR - curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C $LINUXBREW_INSTALL_DIR + if [ "$INSTALL_HOMEBREW_ON_HOME" != "" ]; then + HOMEBREW_INSTALL_DIR=$HOME/.linuxbrew + echo "Start custom installation to $HOMEBREW_INSTALL_DIR" + mkdir -p $HOMEBREW_INSTALL_DIR + pushd $HOMEBREW_INSTALL_DIR + curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C $HOMEBREW_INSTALL_DIR popd else /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" diff --git a/zsh/config.d/zshrc b/zsh/config.d/zshrc index e3e2c4fc..bb960ce6 100644 --- a/zsh/config.d/zshrc +++ b/zsh/config.d/zshrc @@ -122,10 +122,10 @@ Darwin*) Linux*) eval `ssh-agent -s` - if test -f ~/home/linuxbrew/.linuxbrew/bin/brew; then - export HOMEBREW_ROOT=/home/linuxbrew/.linuxbrew - else + if test -f $HOME/.linuxbrew/bin/brew; then export HOMEBREW_ROOT=$HOME/.linuxbrew + else + export HOMEBREW_ROOT=/home/linuxbrew/.linuxbrew fi ;; esac