diff options
| author | Mike McQuaid | 2013-01-30 19:36:24 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2013-01-30 21:29:19 -0800 |
| commit | 32874cbcb855e6a765833f57af79ee6ad5b92f20 (patch) | |
| tree | f9df43839921594e15c733f9122790e070b33a12 /Library | |
| parent | fbbfc7474c53d1f7a37de4106db00fb5c7c53e60 (diff) | |
| download | homebrew-32874cbcb855e6a765833f57af79ee6ad5b92f20.tar.bz2 | |
Add SourceForge bottle mirror selection.
Use ENV['HOMEBREW_SOURCEFORGE_MIRROR'].
Closes #15642.
Closes #17368.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Contributions/manpages/brew.1.md | 6 | ||||
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md index b151b6f0a..168af06d8 100644 --- a/Library/Contributions/manpages/brew.1.md +++ b/Library/Contributions/manpages/brew.1.md @@ -446,6 +446,12 @@ can take several different forms: *Note:* Homebrew will only try to print emoji on Lion or newer. + * HOMEBREW\_SOURCEFORGE\_MIRROR: + If set, Homebrew will use the value of `HOMEBREW_SOURCEFORGE_MIRROR` to + select a SourceForge mirror for downloading bottles. + + *Example:* `export HOMEBREW_SOURCEFORGE_MIRROR='heanet'` + * HOMEBREW\_SVN: When exporting from Subversion, Homebrew will use `HOMEBREW_SVN` if set, a Homebrew-built Subversion if installed, or the system-provided binary. diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 7f76d6f52..62e210ded 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -200,6 +200,8 @@ class CurlBottleDownloadStrategy < CurlDownloadStrategy def initialize name, package super @tarball_path = HOMEBREW_CACHE/"#{name}-#{package.version}#{ext}" + mirror = ENV['HOMEBREW_SOURCEFORGE_MIRROR'] + @url = "#{@url}?use_mirror=#{mirror}" if mirror end end |
