brew-aspell-dictionaries: use new Resource#fetch API.

Also improve the code and output so we output everything in a
copy-pasteable format at the end.
master
Mike McQuaid 2019-06-15 17:26:33 +01:00
parent df2a382bc9
commit 1dfc565550
1 changed files with 7 additions and 2 deletions

View File

@ -23,12 +23,17 @@ URI.parse("#{dict_url}/0index.html").open do |content|
end end
end end
languages.each do |lang, path| resources = languages.map do |lang, path|
r = Resource.new(lang) r = Resource.new(lang)
r.owner = Formulary.factory("aspell") r.owner = Formulary.factory("aspell")
r.url "#{dict_url}/#{path}" r.url "#{dict_url}/#{path}"
r.mirror "#{dict_mirror}/#{path}" r.mirror "#{dict_mirror}/#{path}"
r.fetch r
end
resources.each {|r| r.fetch(verify_download_integrity: false)}
resources.each do |r|
puts <<-EOS puts <<-EOS
resource "#{r.name}" do resource "#{r.name}" do
url "#{r.url}" url "#{r.url}"