aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/mirror.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-08-08 19:26:33 +0200
committerGitHub2017-08-08 19:26:33 +0200
commit1a30c165bfb82ae846e64c508f06455e0d3f285e (patch)
treeab63c314bed39e41dfe47273902ca14c15515c23 /Library/Homebrew/dev-cmd/mirror.rb
parent93051b27d6886dae6df01544c86df579f21f6410 (diff)
parentae4bafdb365cfa380d129b0a03bd99a1e4d960a4 (diff)
downloadbrew-1a30c165bfb82ae846e64c508f06455e0d3f285e.tar.bz2
Merge pull request #3026 from reitermarkus/refactor-download-strategies
Refactor download strategies.
Diffstat (limited to 'Library/Homebrew/dev-cmd/mirror.rb')
-rw-r--r--Library/Homebrew/dev-cmd/mirror.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/dev-cmd/mirror.rb b/Library/Homebrew/dev-cmd/mirror.rb
index e2492203d..6445bc34c 100644
--- a/Library/Homebrew/dev-cmd/mirror.rb
+++ b/Library/Homebrew/dev-cmd/mirror.rb
@@ -25,9 +25,9 @@ module Homebrew
"public_download_numbers": true,
"public_stats": true}
EOS
- curl "--silent", "--fail", "-u#{bintray_user}:#{bintray_key}",
- "-H", "Content-Type: application/json",
- "-d", package_blob, bintray_repo_url
+ curl "--silent", "--fail", "--user", "#{bintray_user}:#{bintray_key}",
+ "--header", "Content-Type: application/json",
+ "--data", package_blob, bintray_repo_url
puts
end
@@ -40,8 +40,8 @@ module Homebrew
content_url = "https://api.bintray.com/content/homebrew/mirror"
content_url += "/#{bintray_package}/#{f.pkg_version}/#{filename}"
content_url += "?publish=1"
- curl "--silent", "--fail", "-u#{bintray_user}:#{bintray_key}",
- "-T", download, content_url
+ curl "--silent", "--fail", "--user", "#{bintray_user}:#{bintray_key}",
+ "--upload-file", download, content_url
puts
ohai "Mirrored #{filename}!"
end