diff options
| author | Jack Nagel | 2014-12-09 19:59:16 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-12-09 19:59:16 -0500 |
| commit | 1ca91d54b03aae0e5530c1da3252b45fc2b36a48 (patch) | |
| tree | 00326df3fa2bb45e3abdbb26f3f0e791dcccc919 /Library/Formula | |
| parent | bb9aeffb1d8636a155a3a9161172f0c7f7ec8646 (diff) | |
| download | homebrew-1ca91d54b03aae0e5530c1da3252b45fc2b36a48.tar.bz2 | |
xulrunner: clean up download strategy
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/xulrunner.rb | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/Library/Formula/xulrunner.rb b/Library/Formula/xulrunner.rb index 09c303283..bd3e313e8 100644 --- a/Library/Formula/xulrunner.rb +++ b/Library/Formula/xulrunner.rb @@ -2,23 +2,12 @@ require "formula" # speed up head clone, see: https://developer.mozilla.org/en-US/docs/Developer_Guide/Source_Code/Mercurial/Bundles class HgBundleDownloadStrategy < CurlDownloadStrategy - def hgpath - MercurialDownloadStrategy.new(@name, @resource).hgpath - end - - def fetch - @repo = @url.split("|").last - @url = @url.split("|").first - super() - end - def stage - safe_system "mkdir mozilla-central" - safe_system hgpath, "init", "mozilla-central" + mkdir "mozilla-central" + quiet_safe_system hgpath, "init", "mozilla-central" chdir - safe_system hgpath, "unbundle", @tarball_path - safe_system hgpath, "pull", @repo - safe_system hgpath, "update" + quiet_safe_system hgpath, "unbundle", cached_location + quiet_safe_system hgpath, "pull", "--update", meta.fetch(:repo) end end @@ -50,8 +39,8 @@ class Xulrunner < Formula end head do - url "https://ftp.mozilla.org/pub/mozilla.org/firefox/bundles/mozilla-central.hg|https://hg.mozilla.org/mozilla-central/", - :using => HgBundleDownloadStrategy + url "https://ftp.mozilla.org/pub/mozilla.org/firefox/bundles/mozilla-central.hg", + :using => HgBundleDownloadStrategy, :repo => "https://hg.mozilla.org/mozilla-central" depends_on :hg => :build depends_on "gettext" => :build end |
