Bug 1240916 - Part 1: Fix dictionary upgrade scripts
authorKevin Atkinson <kevina@gnu.org>
Thu, 21 Jan 2016 14:35:29 -0500
changeset 310953 c422b98713e48d24ff1d72644b9f62e0cea61af1
parent 310952 513ae25154b3e71451c63303cdbf059f2edbc65a
child 310954 1fa9b8e51c285b27bf7730655d7c0385d83383f8
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1240916
milestone45.0a2
Bug 1240916 - Part 1: Fix dictionary upgrade scripts
extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/install-new-dict
extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/make-new-dict
--- a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/install-new-dict
+++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/install-new-dict
@@ -17,17 +17,17 @@ if [ -e orig-bk ]; then echo "$0: direct
 mv orig orig-bk
 mkdir orig
 cp $SPELLER/en_US-custom.dic $SPELLER/en_US-custom.aff $SPELLER/README_en_US-custom.txt orig
 
 mkdir mozilla-bk
 mv ../en-US.dic ../en-US.aff ../README_en_US.txt mozilla-bk
 
 # Convert the affix file to ISO8859-1
-sed -i=bak -e '/^ICONV/d' -e 's/^SET UTF8$/SET ISO8859-1/' en_US-mozilla.aff
+sed -i=bak -e '/^ICONV/d' -e 's/^SET UTF-8$/SET ISO8859-1/' en_US-mozilla.aff
 
 # Convert the dictionary to ISO8859-1
 mv en_US-mozilla.dic en_US-mozilla-utf8.dic
 iconv -f utf-8 -t iso-8859-1 < en_US-mozilla-utf8.dic > en_US-mozilla.dic
 
 cp en_US-mozilla.aff ../en-US.aff
 cp en_US-mozilla.dic ../en-US.dic
 cp README_en_US-mozilla.txt ../README_en_US.txt
--- a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/make-new-dict
+++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/make-new-dict
@@ -39,17 +39,17 @@ EOF
 cd $WKDIR
 
 # Note: Input and output of "expand" is always iso-8859-1.
 #       All expanded word list files are thus in iso-8859-1.
 
 expand $SPELLER/en.aff < $SPELLER/en.dic.supp > 0-special # input: ASCII
 
 # input in utf-8, expand expects iso-8859-1 so use iconv
-iconv -f utf-8 -t iso-8859-1 $ORIG/en_US-custom.dic | expand $ORIG/en_US-custom.aff > 1-base.txt
+iconv -f utf-8 -t iso-8859-1 $ORIG/en_US-custom.dic | expand $SPELLER/en_US-custom.aff > 1-base.txt
 
 expand ../en-US.aff < ../en-US.dic > 2-mozilla.txt # input: iso-8850-1
 
 # input in utf-8, expand expects iso-8859-1 so use iconv
 iconv -f utf-8 -t iso-8859-1 $SPELLER/en_US-custom.dic | expand $SPELLER/en_US-custom.aff > 3-upstream.txt 
 
 comm -23 1-base.txt 2-mozilla.txt > 2-mozilla-rem
 comm -13 1-base.txt 2-mozilla.txt > 2-mozilla-add