Skip to content

Instantly share code, notes, and snippets.

@kurobeats
Last active July 20, 2018 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurobeats/670841aa2aa6de0711675ec8ff1d346f to your computer and use it in GitHub Desktop.
Save kurobeats/670841aa2aa6de0711675ec8ff1d346f to your computer and use it in GitHub Desktop.
a sane way to install homebrew for linux
#!/bin/bash
git clone https://github.com/Linuxbrew/brew.git ~/.local/share/linuxbrew
PATH="$HOME/.local/share/linuxbrew/bin:$PATH"
export MANPATH="$(brew --prefix)/share/man:$MANPATH"
export INFOPATH="$(brew --prefix)/share/info:$INFOPATH"
test -d ~/.local/share/linuxbrew && PATH="$HOME/.local/share/linuxbrew/bin:$HOME/.local/share/linuxbrew/sbin:$PATH"
test -d ~/.local/share/linuxbrew && PATH="~/.local/share/linuxbrew/bin:~/.local/share/linuxbrew/sbin:$PATH"
test -r ~/.bash_profile && echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.bash_profile
echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment