Skip to content

Instantly share code, notes, and snippets.

@canering
Forked from karmi/hook_up_homebrew.sh
Created October 4, 2016 05:28
Show Gist options
  • Save canering/11f7b7f811b106546d19702267bd95a3 to your computer and use it in GitHub Desktop.
Save canering/11f7b7f811b106546d19702267bd95a3 to your computer and use it in GitHub Desktop.
Hook up your Homebrew installed with curl to your Github fork
# Install Homebrew
#
mkdir -p /usr/local
mkdir -p /usr/local/bin
sudo chown -R $USER /usr/local
cd $HOME && mkdir -p homebrew
curl -L https://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C homebrew
ln -nfs $HOME/homebrew/bin/brew /usr/local/bin/
brew update
# Hook up Homebrew installation in `~/homebrew` to your fork
#
rm -rf /tmp/myhomebrew
git clone [email protected]:$USER/homebrew.git /tmp/myhomebrew
git --git-dir=/tmp/myhomebrew/.git remote rename origin $USER
git --git-dir=/tmp/myhomebrew/.git remote add upstream git://github.com/mxcl/homebrew.git
cp -r /tmp/myhomebrew/.git $HOME/homebrew/.git
rm -rf /tmp/myhomebrew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment