diff options
| author | Max Howell | 2009-10-23 14:46:59 +0100 |
|---|---|---|
| committer | Max Howell | 2009-10-23 19:12:29 +0100 |
| commit | 2b4f9e45b25e485209e58ba55264e1c9e481bbc0 (patch) | |
| tree | 0b3e0fb3372c48eacc3b4826d2dbdbc124b0767f | |
| parent | e1d82cde7981c6530419cf4021d52edb7a3f88f1 (diff) | |
| download | brew-2b4f9e45b25e485209e58ba55264e1c9e481bbc0.tar.bz2 | |
Improved installation instructions
I managed to get the install line down to a one-liner.
| -rw-r--r-- | README.md | 99 |
1 files changed, 47 insertions, 52 deletions
@@ -116,51 +116,32 @@ Max Howell -- <http://twitter.com/mxcl> Installation ============ -Homebrew requires no setup, but almost everything it installs is built from -source; so you need Xcode: +Homebrew is pretty flexible in how it can be installed and used. What follows +are probably the simplest methods. -<http://developer.apple.com/technology/xcode.html> - -Many build scripts assume MacPorts or Fink on OS X. Which isn't too much of a -problem until you uninstall them and stuff you built with Homebrew breaks. So -uninstall them (if you prefer, renaming their root folders is sufficient). - -<http://trac.macports.org/wiki/FAQ#uninstall> -<http://www.finkproject.org/faq/usage-fink.php#removing> - -Now, download Homebrew: - - git clone git://github.com/mxcl/homebrew.git - -If this leaves you shaking your head because you are installing Homebrew -*in order to* install git, then try [this installer script][sh] or [this -.pkg installer][pkg]. Note these are somewhat new and are not stamped -"definitely works" yet. - -[sh]: http://gist.github.com/203926 -[pkg]: http://demaree.me/x/7 +Download +-------- + mkdir homebrew + curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C homebrew -Homebrew is self-contained so once you've put it somewhere, it's ready to go. -Copy this directory anywhere you like. But we recommend installing to -/usr/local because: +Homebrew can already be used, try it: -1. It is already in your path -2. Build scripts always look in /usr/local for dependencies so it makes it - easier for you personally to build and install software + homebrew/bin/brew install git + homebrew/bin/brew list git -You can move the location of Homebrew at a later time, although this *will* -break some tools because they hardcode their installtion prefixes into their -binaries. Homebrew does make more effort than competing solutions to prevent -this though. +Notice how Homebrew installed Git to homebrew/bin/git. Homebrew never touches +files outside its prefix. -Finally, if you don't install to /usr/local, you have to add the following to -your ~/.profile file: +Installing to /usr/local +------------------------ +We think /usr/local is the best location for Homebrew because: - export PATH=`brew --prefix`/bin:$PATH - export MANPATH=`brew --prefix`/share/man:$MANPATH +1. It's already in your PATH +2. Other software checks /usr/local for stuff (eg. RubyGems) +3. Building your own software is easier when dependencies are in /usr/local -Don't sudo ----------- +But… don't sudo! +---------------- Well clearly you can sudo if you like. Homebrew is all about you doing it your way. But the Homebrew recommendation is: don't sudo! @@ -180,26 +161,39 @@ installing anything system-critical. Apple already did that. Let this be the last sudo you do for quite some time: - sudo chown -R `whoami`:staff `brew --prefix` + sudo chown -R `whoami` /usr/local -I already have a bunch of junk in /usr/local --------------------------------------------- -The easiest thing to do is just git clone into /usr/local. The files that are -there can remain there, Homebrew will never touch them. +But! I already have a bunch of junk in /usr/local +------------------------------------------------- +Homebrew can co-exist with any software already installed in its prefix. + +Installing to /usr/local +------------------------ + curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local + +You may prefer this third party [installer script][sh] or [.pkg installer][pkg]. + +Using git to install +-------------------- +If you already have git installed then this is the easiest way to install: cd /usr/local git init git remote add origin git://github.com/mxcl/homebrew.git git pull origin master -Otherwise, delete everything and reinstall with Homebrew. Or merge it in two -steps by hand. +Building Stuff +-------------- +Almost everything Homebrew installs is written in C, so you need Xcode: -How about mate and gitx and that? ---------------------------------- -These tools install from TextMate and GitX into /usr/local/bin. They (and -other similar tools) can co-exist with Homebrew without requiring further -effort from yourself. +<http://developer.apple.com/technology/xcode.html> + +Many build scripts assume MacPorts or Fink on OS X. Which isn't too much of a +problem until you uninstall them and stuff you built with Homebrew breaks. So +uninstall them (if you prefer, renaming their root folders is sufficient). + +<http://trac.macports.org/wiki/FAQ#uninstall> +<http://www.finkproject.org/faq/usage-fink.php#removing> Uninstallation @@ -207,8 +201,7 @@ Uninstallation cd `brew --prefix` rm -rf Cellar brew prune - rm -rf Library .git - rm bin/brew .gitignore README.md + rm -rf Library .git* bin/brew README.md It is worth noting that if you installed somewhere like /usr/local then these uninstallation steps will leave that directory exactly like it was before @@ -319,3 +312,5 @@ FAQ [wiki]: http://wiki.github.com/mxcl/homebrew [github-gem]: http://github.com/defunkt/github-gem +[sh]: http://gist.github.com/203926 +[pkg]: http://demaree.me/x/7 |
