diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index cba5375e15..1cd22b1149 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -19,7 +19,6 @@ require 'rexml/xmldecl' require 'rexml/cdata' EMAIL_SUBJECT_FILE = "brew-test-bot.#{MacOS.cat}.email.txt" -HOMEBREW_CONTRIBUTED_CMDS = HOMEBREW_REPOSITORY + "Library/Contributions/cmd/" class Step attr_reader :command, :name, :status, :output, :time diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb index c41a80be32..06d45555d9 100644 --- a/Library/Homebrew/cmd/create.rb +++ b/Library/Homebrew/cmd/create.rb @@ -118,7 +118,7 @@ class FormulaCreator require 'formula' # Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook - # #{HOMEBREW_PREFIX}/Library/Contributions/example-formula.rb + # #{HOMEBREW_CONTRIB}/example-formula.rb # PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! class #{Formula.class_s name} < Formula diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index d41c539dc3..b306b5850d 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -926,7 +926,7 @@ def check_git_status If this a surprise to you, then you should stash these modifications. Stashing returns Homebrew to a pristine state but can be undone should you later need to do so for some reason. - cd #{HOMEBREW_REPOSITORY}/Library && git stash && git clean -d -f + cd #{HOMEBREW_LIBRARY} && git stash && git clean -d -f EOS end end @@ -1032,7 +1032,7 @@ def check_for_outdated_homebrew timestamp = if File.directory? ".git" `git log -1 --format="%ct" HEAD`.to_i else - (HOMEBREW_REPOSITORY/"Library").mtime.to_i + HOMEBREW_LIBRARY.mtime.to_i end if Time.now.to_i - timestamp > 60 * 60 * 24 then <<-EOS.undent diff --git a/Library/Homebrew/cmd/edit.rb b/Library/Homebrew/cmd/edit.rb index f5635fa816..4e3298c3f5 100644 --- a/Library/Homebrew/cmd/edit.rb +++ b/Library/Homebrew/cmd/edit.rb @@ -43,7 +43,7 @@ module Homebrew extend self end def library_folders - Dir["#{HOMEBREW_REPOSITORY}/Library/*"].reject do |d| + Dir["#{HOMEBREW_LIBRARY}/*"].reject do |d| case File.basename(d) when 'LinkedKegs', 'Aliases' then true end end end diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index 21ad00c6e1..2b17629a5b 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -83,7 +83,7 @@ module Homebrew extend self def repair_taps count = 0 # prune dead symlinks in Formula - Dir["#{HOMEBREW_REPOSITORY}/Library/Formula/*.rb"].each do |fn| + Dir["#{HOMEBREW_LIBRARY}/Formula/*.rb"].each do |fn| if not File.exist? fn File.delete fn count += 1 diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 169a4200c0..6c05bddb4f 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -185,7 +185,7 @@ module Superenv end def determine_pkg_config_libdir - paths = %W{/usr/lib/pkgconfig #{HOMEBREW_REPOSITORY}/Library/ENV/pkgconfig/#{MacOS.version}} + paths = %W{/usr/lib/pkgconfig #{HOMEBREW_LIBRARY}/ENV/pkgconfig/#{MacOS.version}} paths << "#{MacOS::X11.lib}/pkgconfig" << "#{MacOS::X11.share}/pkgconfig" if x11? paths.to_path_s end diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 92b7d40a0f..9190371ddb 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -362,7 +362,7 @@ class Formula # an array of all Formula names def self.names - Dir["#{HOMEBREW_REPOSITORY}/Library/Formula/*.rb"].map{ |f| File.basename f, '.rb' }.sort + Dir["#{HOMEBREW_LIBRARY}/Formula/*.rb"].map{ |f| File.basename f, '.rb' }.sort end def self.each @@ -393,7 +393,7 @@ class Formula end def self.aliases - Dir["#{HOMEBREW_REPOSITORY}/Library/Aliases/*"].map{ |f| File.basename f }.sort + Dir["#{HOMEBREW_LIBRARY}/Aliases/*"].map{ |f| File.basename f }.sort end # TODO - document what this returns and why @@ -402,7 +402,7 @@ class Formula if name.include? "/" if name =~ %r{(.+)/(.+)/(.+)} tap_name = "#$1-#$2".downcase - tapd = Pathname.new("#{HOMEBREW_REPOSITORY}/Library/Taps/#{tap_name}") + tapd = Pathname.new("#{HOMEBREW_LIBRARY}/Taps/#{tap_name}") tapd.find_formula do |relative_pathname| return "#{tapd}/#{relative_pathname}" if relative_pathname.stem.to_s == $3 end if tapd.directory? @@ -412,13 +412,13 @@ class Formula end # test if the name is a core formula - formula_with_that_name = Pathname.new("#{HOMEBREW_REPOSITORY}/Library/Formula/#{name}.rb") + formula_with_that_name = Pathname.new("#{HOMEBREW_LIBRARY}/Formula/#{name}.rb") if formula_with_that_name.file? and formula_with_that_name.readable? return name end # test if the name is a formula alias - possible_alias = Pathname.new("#{HOMEBREW_REPOSITORY}/Library/Aliases/#{name}") + possible_alias = Pathname.new("#{HOMEBREW_LIBRARY}/Aliases/#{name}") if possible_alias.file? return possible_alias.realpath.basename('.rb').to_s end @@ -457,7 +457,7 @@ class Formula end def self.path name - Pathname.new("#{HOMEBREW_REPOSITORY}/Library/Formula/#{name.downcase}.rb") + Pathname.new("#{HOMEBREW_LIBRARY}/Formula/#{name.downcase}.rb") end def env diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 12e77c4077..1a5d2efaa5 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -84,7 +84,7 @@ HOMEBREW_USER_AGENT = "Homebrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY HOMEBREW_CURL_ARGS = '-f#LA' HOMEBREW_TAP_FORMULA_REGEX = %r{^(\w+)/(\w+)/([^/]+)$} -HOMEBREW_TAP_DIR_REGEX = %r{#{HOMEBREW_REPOSITORY}/Library/Taps/(\w+)-(\w+)} +HOMEBREW_TAP_DIR_REGEX = %r{#{HOMEBREW_LIBRARY}/Taps/(\w+)-(\w+)} HOMEBREW_TAP_PATH_REGEX = Regexp.new(HOMEBREW_TAP_DIR_REGEX.source \ + %r{/(.*)}.source) diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb index 9f815166f3..dbecaa8e16 100644 --- a/Library/Homebrew/test/test_formula.rb +++ b/Library/Homebrew/test/test_formula.rb @@ -190,7 +190,7 @@ class FormulaTests < Test::Unit::TestCase def test_path name = 'foo-bar' - assert_equal Pathname.new("#{HOMEBREW_REPOSITORY}/Library/Formula/#{name}.rb"), Formula.path(name) + assert_equal Pathname.new("#{HOMEBREW_LIBRARY}/Formula/#{name}.rb"), Formula.path(name) end def test_factory diff --git a/Library/brew.rb b/Library/brew.rb index 0c1aef8126..dad310e849 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -90,7 +90,7 @@ begin end # Add contributed commands to PATH before checking. - ENV['PATH'] += ":#{HOMEBREW_REPOSITORY}/Library/Contributions/cmd" + ENV['PATH'] += ":#{HOMEBREW_CONTRIB}/cmd" if require? HOMEBREW_REPOSITORY/"Library/Homebrew/cmd"/cmd Homebrew.send cmd.to_s.gsub('-', '_').downcase elsif which "brew-#{cmd}"