From a07ab8bb92da082078203301a22eef68eaf3d0ac Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 15 Jul 2016 19:33:30 +0100 Subject: [PATCH] brew.{rb,sh}: move to Library/Homebrew. (#506) --- Library/{ => Homebrew}/brew.rb | 2 +- Library/{ => Homebrew}/brew.sh | 2 +- Library/Homebrew/cmd/update.sh | 2 +- Library/Homebrew/test/.simplecov | 2 +- Library/Homebrew/test/test_integration_cmds.rb | 2 +- bin/brew | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename Library/{ => Homebrew}/brew.rb (98%) rename Library/{ => Homebrew}/brew.sh (99%) diff --git a/Library/brew.rb b/Library/Homebrew/brew.rb similarity index 98% rename from Library/brew.rb rename to Library/Homebrew/brew.rb index 9110d5db03..9d29f43962 100644 --- a/Library/brew.rb +++ b/Library/Homebrew/brew.rb @@ -1,7 +1,7 @@ std_trap = trap("INT") { exit! 130 } # no backtrace thanks require "pathname" -HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent.join("Homebrew") +HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent $:.unshift(HOMEBREW_LIBRARY_PATH.to_s) require "global" diff --git a/Library/brew.sh b/Library/Homebrew/brew.sh similarity index 99% rename from Library/brew.sh rename to Library/Homebrew/brew.sh index 5dd1ce6308..dd9e54e7e6 100644 --- a/Library/brew.sh +++ b/Library/Homebrew/brew.sh @@ -245,5 +245,5 @@ else # Unshift command back into argument list (unless argument list was empty). [[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@" - { update-preinstall; exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/brew.rb" "$@"; } + { update-preinstall; exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/Homebrew/brew.rb" "$@"; } fi diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 49a15864f7..e9ad69c064 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -9,7 +9,7 @@ # shellcheck source=/dev/null source "$HOMEBREW_LIBRARY/Homebrew/utils/lock.sh" -# Replaces the function in Library/brew.sh to cache the Git executable to +# Replaces the function in Library/Homebrew/brew.sh to cache the Git executable to # provide speedup when using Git repeatedly (as update.sh does). git() { if [[ -z "$GIT_EXECUTABLE" ]] diff --git a/Library/Homebrew/test/.simplecov b/Library/Homebrew/test/.simplecov index 3dec7d3b7c..b3f87cfdb7 100644 --- a/Library/Homebrew/test/.simplecov +++ b/Library/Homebrew/test/.simplecov @@ -34,7 +34,7 @@ SimpleCov.start do add_group "OS", "/Homebrew/os/" add_group "Requirements", "/Homebrew/requirements/" add_group "Scripts", %w[ - /brew.rb + /Homebrew/brew.rb /Homebrew/build.rb /Homebrew/postinstall.rb /Homebrew/test.rb diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index 642fadf5f0..c020deaf49 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -64,7 +64,7 @@ class IntegrationCommandTests < Homebrew::TestCase cmd_args << "-rsimplecov" end cmd_args << "-rintegration_mocks" - cmd_args << (HOMEBREW_LIBRARY_PATH/"../brew.rb").resolved_path.to_s + cmd_args << (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path.to_s cmd_args += args Bundler.with_original_env do ENV["HOMEBREW_BREW_FILE"] = HOMEBREW_PREFIX/"bin/brew" diff --git a/bin/brew b/bin/brew index 77611c153d..0fabbb97ef 100755 --- a/bin/brew +++ b/bin/brew @@ -25,4 +25,4 @@ fi HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library" -source "$HOMEBREW_LIBRARY/brew.sh" +source "$HOMEBREW_LIBRARY/Homebrew/brew.sh"