aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/global.rb
AgeCommit message (Collapse)Author
2009-11-11It's about time we bumped the version eh?0.5Max Howell
2009-11-08Set ENV[HOMEBREW_BREW_FILE]Max Howell
Thus install.rb gets the path to the instantiating brew process rather than whichever is first in the PATH. Not to mention Homebrew doesn't *have* to be in the PATH.
2009-11-08Rename BREW_FILE HOMEBREW_BREW_FILEMax Howell
Because it's a global.h constant and that file can be included by other projects.
2009-11-07Propagate exit status in ExecutioError exceptionMax Howell
2009-11-07Move BuildError and ExceutionError to global.hMax Howell
More sensible, and fixes brew
2009-11-07Don't require hardware.rb globallyMax Howell
2009-11-04Tweak code to locate Cellar path.Adam Vandenberg
I think this tweak to finding the Cellar path addresses one of mxcl's concerns over supported install scenarios.
2009-11-04Rewrite of HOMEBREW_ folder locationsAdam Vandenberg
This rewrite attempts to sort out where the Prefix, Cellar, and Repository are relative to the real and symlinked 'brew' command. Also included is a --config option which dumps all of these variables. Any top-level script must define a "BREW_FILE" that gives the path to brew as it exists in the path. 'brew' itself just uses __FILE__ and install.rb does a `which brew` (there may be a better way?) The Prefix is always relative to the location of brew as it exists in the path. Thus, whether or not /usr/local/bin/brew is a symlink or real file, the Prefix is always /usr/local. If you have brew in some other prefix, such as /nonstandard/bin/brew, then '/nonstandard/ will be managed by brew instead. The Repository, Cellar, and "Library/Homebrew" required code is always found relative to the "real" path or brew. If brew is a real file in /usr/local/bin/brew, then everything else will be found in /usr/local and we'll expect a /usr/local/.git Otherwise, we dereference brew's symlink and look for everything else relative to that path instead.
2009-10-15Some subdirs and renames to aid homebrew n00bsMax Howell
The classes better reflect their contents. I'm sure this change may be contentious, but I am a sucker for trying to create source bases that are easy to get to grips with and easy to navigate. brewkit.rb is now a deprecated file.
2009-09-30Determine the repo path in a symlink-friendly way.Steve Losh
The Contributions/selflink.sh script does not symlink the .git directory, so 'brew update' will fail because the prefix (/usr/local/) is not a git repository. To determine the actual location of the git repo we can get the realpath of the Library (to expand any symlinks) and take the parent of that.
2009-09-30Fixes Homebrew/homebrew#68, let's not break fresh Homebrew installsMax Howell
Thanks to boztek for spotting this. I'll commit a test shortly.
2009-09-29Add HOMEBREW_REPOSITORY prefix for `brew up`Andre Arko
Signed-off-by: Max Howell <max@methylblue.com> I removed whitespace changes and changed readlink to realpath as readlink raises if it's not a link.
2009-09-25Add full version and build numbers to user agentPiotr Usewicz
Signed-off-by: Max Howell <max@methylblue.com> I adapted it slightly based on the user agent that Safari gives.
2009-09-16Allow formulae to use __END__Max Howell
For this to work the "running script" must be the formulae file. Making this so wasn't so hard, there is now an install.rb script which is included with the -r flag to the ruby executable. An at_exit handler calls the install function. Having the install logic in its own file made it feel like there was so much space that I added extra error handling. So there is something to be said for separating functionality out into its own files. Still the error handling sucks, we'll need to marshall the exception back to the bin/brew command. Which is another PITA. Still overall I think this will prove worthwhile. But if it doesn't we'll revert. As a first usage, you can put a diff after __END__ and return DATA from Formula::patches to make Homebrew aware of it.