From e6f260de278b55940a300a3b1536ff45b4a5755f Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sun, 13 Sep 2015 01:03:38 +0800 Subject: aspell-dictionaries: move to dev-cmd --- Library/Homebrew/dev-cmd/aspell-dictionaries.rb | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Library/Homebrew/dev-cmd/aspell-dictionaries.rb (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/aspell-dictionaries.rb b/Library/Homebrew/dev-cmd/aspell-dictionaries.rb new file mode 100644 index 000000000..754b6614e --- /dev/null +++ b/Library/Homebrew/dev-cmd/aspell-dictionaries.rb @@ -0,0 +1,42 @@ +require "open-uri" +require "resource" +require "formula" + +module Homebrew + def aspell_dictionaries + dict_url = "http://ftpmirror.gnu.org/aspell/dict" + dict_mirror = "https://ftp.gnu.org/gnu/aspell/dict" + languages = {} + + open("#{dict_url}/0index.html") do |content| + content.each_line do |line| + break if %r{^