-
-
Save canering/e57a877ee0271f19d67d34b89c4eb524 to your computer and use it in GitHub Desktop.
backup copy of a single-user `brew` installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change to whatever location to where homebrew is installed | |
if [ -z "$HOMEBREW_HOME" ]; then | |
export HOMEBREW_HOME=$HOME/homebrew | |
echo "HOMEBREW_HOME=$HOME/homebrew" >> ~/.profile | |
fi | |
# install homebrew for single user | |
if [ ! -d "$HOMEBREW_HOME" ]; then | |
mkdir -p $HOMEBREW_HOME && curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C $HOMEBREW_HOME | |
fi | |
# add the new homebrew bin directory to the path | |
if [ -z `echo $PATH | grep "$HOMEBREW_HOME"` ]; then | |
echo "PATH=$HOMEBREW_HOME/bin:$PATH" >> ~/.profile | |
export PATH=$HOMEBREW_HOME/bin:$PATH | |
fi | |
# configure the local homebrew cache directory | |
if [ -z "$HOMEBREW_CACHE" ]; then | |
echo "HOMEBREW_CACHE=$HOME/Library/Caches/Homebrew" >> ~/.profile | |
export HOMEBREW_CACHE=$HOME/Library/Caches/Homebrew | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment