xulrunner: clean up download strategy
This commit is contained in:
parent
ceffd642a0
commit
e10c891453
1 changed files with 6 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue