#!/bin/bash DOWNLOAD='yes' GIT_DIR='dictionaries' VERBOSE='no' declare -A provides_map=( ["myspell-af_ZA"]="myspell-african" ["myspell-ar"]="myspell-arabic" ["myspell-be_BY"]="myspell-belarusian" ["myspell-bg_BG"]="myspell-bulgarian" ["myspell-bn_BD"]="myspell-bengali" ["myspell-br_FR"]="myspell-breton" ["myspell-ca"]="myspell-catalan myspell-valencian" ["myspell-cs_CZ"]="myspell-czech" ["myspell-da_DK"]="myspell-danish" ["myspell-el_GR"]="myspell-greek" ["myspell-en"]="myspell-american myspell-australian myspell-canadian myspell-british myspell-new-zaeland myspell-south-african-english" ["myspell-es"]="myspell-spanish myspell-mexican myspell-spanish-argentine myspell-spanish-bolivian myspell-spanish-chilean myspell-spanish-colombian myspell-spanish-costa-rican myspell-spanish-dominican myspell-spanish-ecuadorian myspell-spanish-guatemalan myspell-spanish-honduran myspell-spanish-nicaraguan myspell-spanish-panamanian myspell-spanish-paraguayan myspell-spanish-peruvian myspell-spanish-puerto-rican myspell-spanish-salvadorean myspell-spanish-uruguayan myspell-spanish-venezuelan" ["myspell-et_EE"]="myspell-estonian" ["myspell-fr_FR"]="myspell-french" ["myspell-gd_GB"]="myspell-gaelic" ["myspell-gl"]="myspell-galician" ["myspell-gu_IN"]="myspell-gujarati" ["myspell-he_IL"]="myspell-hebrew" ["myspell-hi_IN"]="myspell-hindi" ["myspell-hr_HR"]="myspell-croatian" ["myspell-hu_HU"]="myspell-hungarian" ["myspell-is"]="myspell-icelandic" ["myspell-it_IT"]="myspell-italian" ["myspell-lt_LT"]="myspell-lithuanian" ["myspell-lv_LV"]="myspell-latvian" ["myspell-nl_NL"]="myspell-dutch" ["myspell-no"]="myspell-norsk-bokmaal myspell-norsk-nynorsk" ["myspell-oc_FR"]="myspell-occitan-lengadocian" ["myspell-pl_PL"]="myspell-polish" ["myspell-pt_BR"]="myspell-brazilian" ["myspell-pt_PT"]="myspell-portuguese" ["myspell-ro"]="myspell-romanian" ["myspell-ru_RU"]="myspell-russian" ["myspell-si_LK"]="myspell-sinhala" ["myspell-sk_SK"]="myspell-slovak" ["myspell-sl_SI"]="myspell-slovene" ["myspell-sr"]="myspell-serbian-latin myspell-serbian-cyrillic" ["myspell-sv_SE"]="myspell-swedish" ["myspell-sw_TZ"]="myspell-kiswahili" ["myspell-th_TH"]="myspell-thai" ["myspell-uk_UA"]="myspell-ukrainian" ["myspell-vi"]="myspell-vietnamese" ["myspell-zu_ZA"]="myspell-zulu" ) function directories() { ls $GIT_DIR/*/dictionaries.xcu | sed -e 's:dictionaries/::' -e 's:/dictionaries.xcu::' | tr '\n' ' ' } function locale_to_file_map() { cd $GIT_DIR rm -f locale_to_file_map.txt for dir in $dirs; do cat $dir/dictionaries.xcu \ | grep -v '