diff --git a/cmd/aspell-dictionaries.rb b/cmd/aspell-dictionaries.rb index 0721062830d..b476693eb6c 100755 --- a/cmd/aspell-dictionaries.rb +++ b/cmd/aspell-dictionaries.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true require "cli/parser" -require "open-uri" require "resource" require "formula" @@ -21,43 +20,40 @@ module Homebrew def aspell_dictionaries aspell_dictionaries_args.parse - dict_url = "https://ftp.gnu.org/gnu/aspell/dict" - dict_mirror = "https://ftpmirror.gnu.org/aspell/dict" + dictionary_url = "https://ftp.gnu.org/gnu/aspell/dict" + dictionary_mirror = "https://ftpmirror.gnu.org/aspell/dict" + languages = {} - languages = {} + index_output, = curl_output("#{dictionary_url}/0index.html") + index_output.split("").each do |line| + next unless line.start_with?("