diff --git a/Library/Contributions/cmds/brew-aspell-dictionaries b/Library/Contributions/cmds/brew-aspell-dictionaries new file mode 100755 index 0000000000..b07e1a5e43 --- /dev/null +++ b/Library/Contributions/cmds/brew-aspell-dictionaries @@ -0,0 +1,49 @@ +#!/bin/sh +# +# brew-aspell-dictionaries - update aspell formula to include latest dictionaries +# This script fetches the current index for the aspell dictionaries gnu server, +# it parses the html to retrieve the URL to the dictionary archive for each +# available language. +# The script then calculates the sha1 for each dictionary archive and +# generates a brew formula for each language. +# The result can then to be merged into the aspell formula, to update +# the available dictionary formulae. + +dictionaries_url=http://ftp.gnu.org/gnu/aspell/dict +tmp_file=`mktemp -t brew_aspell_dictionaries` +brew_formulae_tmp_file=`mktemp -t brew_aspell_dictionaries_formulae` + +echo "Downloading aspell dictionaries Index" +curl -s ${dictionaries_url}/0index.html \ + | egrep '^(