aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilovezfs2018-01-24 06:54:14 -0800
committerilovezfs2018-01-28 08:12:12 -0800
commit6460a34e6580260a0392f8945fd31213678a1b34 (patch)
treecddcfe81b571c3ae9b098961d789e421091ec452
parente46fbdd18d7e3f39350073debeca1d59487e1af1 (diff)
downloadbrew-6460a34e6580260a0392f8945fd31213678a1b34.tar.bz2
bump-formula-pr: add Debian mirror handling.
-rw-r--r--Library/Homebrew/dev-cmd/bump-formula-pr.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb
index e536d03be..510650806 100644
--- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb
+++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb
@@ -191,8 +191,11 @@ module Homebrew
elsif !new_url
odie "#{formula}: no --url= argument specified!"
else
- new_mirror = if requested_spec != :devel && new_url =~ %r{.*ftp.gnu.org/gnu.*}
+ new_mirror = case new_url
+ when requested_spec != :devel && %r{.*ftp.gnu.org/gnu.*}
new_url.sub "ftp.gnu.org/gnu", "ftpmirror.gnu.org"
+ when %r{.*mirrors.ocf.berkeley.edu/debian.*}
+ new_url.sub "mirrors.ocf.berkeley.edu/debian", "mirrorservice.org/sites/ftp.debian.org/debian"
end
resource = Resource.new { @url = new_url }
resource.download_strategy = CurlDownloadStrategy