Skip to content

Commit

Permalink
misc(brew): change instruction for home installation
Browse files Browse the repository at this point in the history
  • Loading branch information
himkt committed Nov 9, 2024
1 parent 2d825dd commit 270719a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions brew/bin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
6 changes: 3 additions & 3 deletions zsh/config.d/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 270719a

Please sign in to comment.