From 270719a769d35c898e057b90ab70895c4d51ce62 Mon Sep 17 00:00:00 2001 From: himkt Date: Sat, 9 Nov 2024 19:35:28 +0900 Subject: [PATCH] misc(brew): change instruction for home installation --- brew/bin/setup.sh | 11 ++++++----- zsh/config.d/zshrc | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) 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