diff options
| author | Max Howell | 2012-03-16 12:59:27 +0000 | 
|---|---|---|
| committer | Max Howell | 2012-03-16 21:06:18 +0000 | 
| commit | 0f02354073b3424a8829d3b139cbc07c0dac5958 (patch) | |
| tree | 7ec585760778858e865f718d769e23e56b8a6beb | |
| parent | 4c02b2276b708e6018c28900ab55184c31b0afdc (diff) | |
| download | brew-0f02354073b3424a8829d3b139cbc07c0dac5958.tar.bz2 | |
HOMEBREW_LIBRARY
I got fed up writing HOMEBREW_REPOSITORY/"Library" and also correcting mistakes when I did HOMEBREW_PREFIX instead.
| -rw-r--r-- | Library/Homebrew/cmd/tap.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/untap.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/global.rb | 2 | 
3 files changed, 4 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index 6d1a596a6..6f235fede 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -1,6 +1,3 @@ - -HOMEBREW_LIBRARY = HOMEBREW_REPOSITORY/"Library" -  module Homebrew extend self    def tap diff --git a/Library/Homebrew/cmd/untap.rb b/Library/Homebrew/cmd/untap.rb index 92faf3069..51d99d913 100644 --- a/Library/Homebrew/cmd/untap.rb +++ b/Library/Homebrew/cmd/untap.rb @@ -3,15 +3,15 @@ require 'cmd/tap' # for tap_args  module Homebrew extend self    def untap      user, repo = tap_args -    tapd = HOMEBREW_PREFIX/"Library/Taps/#{user}-#{repo}" +    tapd = HOMEBREW_LIBRARY/"Taps/#{user}-#{repo}"      raise "No such tap!" unless tapd.directory? -    gitignores = (HOMEBREW_PREFIX/"Library/Formula/.gitignore").read.split rescue [] +    gitignores = (HOMEBREW_LIBRARY/"Formula/.gitignore").read.split rescue []      tapd.find_formula do |pn|        bn = pn.basename.to_s -      pn = HOMEBREW_REPOSITORY/"Library/Formula"/bn +      pn = HOMEBREW_LIBRARY/"Formula/#{bn}"        pn.delete if pn.symlink? and pn.realpath.to_s =~ %r[^#{tapd.realpath}]        gitignores.delete(bn)      end diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 573b199e3..a8e0389ec 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -49,6 +49,7 @@ end  HOMEBREW_PREFIX = Pathname.new(HOMEBREW_BREW_FILE).dirname.parent # Where we link under  HOMEBREW_REPOSITORY = Pathname.new(HOMEBREW_BREW_FILE).realpath.dirname.parent # Where .git is found +HOMEBREW_LIBRARY = HOMEBREW_REPOSITORY/"Library"  # Where we store built products; /usr/local/Cellar if it exists,  # otherwise a Cellar relative to the Repository. @@ -60,7 +61,6 @@ end  HOMEBREW_LOGS = Pathname.new('~/Library/Logs/Homebrew/').expand_path -  MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp  MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_f  | 
