aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/--env.rb2
-rw-r--r--Library/Homebrew/download_strategy.rb23
2 files changed, 5 insertions, 20 deletions
diff --git a/Library/Homebrew/cmd/--env.rb b/Library/Homebrew/cmd/--env.rb
index df458fc87..f45386d0c 100644
--- a/Library/Homebrew/cmd/--env.rb
+++ b/Library/Homebrew/cmd/--env.rb
@@ -23,7 +23,7 @@ module Homebrew extend self
CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH MAKEFLAGS
MACOSX_DEPLOYMENT_TARGET PKG_CONFIG_PATH HOMEBREW_BUILD_FROM_SOURCE
HOMEBREW_DEBUG HOMEBREW_MAKE_JOBS HOMEBREW_VERBOSE HOMEBREW_USE_CLANG
- HOMEBREW_USE_GCC HOMEBREW_USE_LLVM HOMEBREW_SVN
+ HOMEBREW_USE_GCC HOMEBREW_USE_LLVM HOMEBREW_SVN HOMEBREW_GIT
MAKE GIT CPP
ACLOCAL_PATH OBJC PATH ].select{ |key| env[key] }
end
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index bd7512a36..68a91d0a4 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -210,7 +210,7 @@ end
class SubversionDownloadStrategy < AbstractDownloadStrategy
def initialize name, package
super
- @@svn ||= find_svn
+ @@svn ||= 'svn'
@unique_token="#{name}--svn" unless name.to_s.empty? or name == '__UNKNOWN__'
@unique_token += "-HEAD" if ARGV.include? '--HEAD'
@co=HOMEBREW_CACHE+@unique_token
@@ -269,20 +269,12 @@ class SubversionDownloadStrategy < AbstractDownloadStrategy
args << '--ignore-externals' if ignore_externals
quiet_safe_system(*args)
end
-
- # Try HOMEBREW_SVN, a Homebrew-built svn, and finally the OS X system svn.
- # Not all features are available in the 10.5 system-provided svn.
- def find_svn
- return ENV['HOMEBREW_SVN'] if ENV['HOMEBREW_SVN']
- return "#{HOMEBREW_PREFIX}/bin/svn" if File.exist? "#{HOMEBREW_PREFIX}/bin/svn"
- return MacOS.locate 'svn'
- end
end
# Require a newer version of Subversion than 1.4.x (Leopard-provided version)
class StrictSubversionDownloadStrategy < SubversionDownloadStrategy
def find_svn
- exe = super
+ exe = `svn -print-path`
`#{exe} --version` =~ /version (\d+\.\d+(\.\d+)*)/
svn_version = $1
version_tuple=svn_version.split(".").collect {|v|Integer(v)}
@@ -316,7 +308,7 @@ end
class GitDownloadStrategy < AbstractDownloadStrategy
def initialize name, package
super
- @@git ||= find_git
+ @@git ||= 'git'
@unique_token="#{name}--git" unless name.to_s.empty? or name == '__UNKNOWN__'
@clone=HOMEBREW_CACHE+@unique_token
end
@@ -334,7 +326,7 @@ class GitDownloadStrategy < AbstractDownloadStrategy
end
def fetch
- raise "You must install Git: brew install git" unless which "git"
+ raise "You must: brew install git" unless which "git"
ohai "Cloning #{@url}"
@@ -405,13 +397,6 @@ class GitDownloadStrategy < AbstractDownloadStrategy
end
end
end
-
- # Try GIT, a Homebrew-built Git, and finally the OS X system Git.
- def find_git
- return ENV['GIT'] if ENV['GIT']
- return "#{HOMEBREW_PREFIX}/bin/git" if File.exist? "#{HOMEBREW_PREFIX}/bin/git"
- return MacOS.locate 'git'
- end
end
class CVSDownloadStrategy < AbstractDownloadStrategy