diff options
| author | Adam Vandenberg | 2009-10-05 11:52:05 -0700 |
|---|---|---|
| committer | Max Howell | 2009-11-04 16:27:34 +0000 |
| commit | ce01313bbc9386aed4fec68940fbdff35868feb5 (patch) | |
| tree | 9d4c4416e482027e9a670503d02b5e01046d82c3 /Library/Homebrew/install.rb | |
| parent | 0221ee2ddfbc59d22bd50f1f045fe6de3dde2692 (diff) | |
| download | homebrew-ce01313bbc9386aed4fec68940fbdff35868feb5.tar.bz2 | |
Rewrite of HOMEBREW_ folder locations
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.
Diffstat (limited to 'Library/Homebrew/install.rb')
| -rwxr-xr-x | Library/Homebrew/install.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb index 927e976bc..a27cd2e4f 100755 --- a/Library/Homebrew/install.rb +++ b/Library/Homebrew/install.rb @@ -1,4 +1,6 @@ #!/usr/bin/ruby +BREW_FILE = `which brew`.strip + require 'global' require 'brew.h' @@ -8,6 +10,7 @@ require 'formula' require 'hardware' require 'keg' + show_summary_heading = false def text_for_keg_only_formula f |
