mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 687118 - Add a helper script for adding/removing a few words from the Hunspell en-US dictionary; r=smaug
This commit is contained in:
parent
ea0ed516c3
commit
a2e3fa67c0
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# edit-dictionary
|
||||
|
||||
# input files:
|
||||
HUNSPELL_START=hunspell-en_US-20081205.dic
|
||||
HUNSPELL_DIFF=upstream-hunspell.diff
|
||||
HUNSPELL_PATCHED=$HUNSPELL_START-patched
|
||||
HUNSPELL_PATCHED_STRIPPED=$HUNSPELL_PATCHED-stripped
|
||||
|
||||
if [ -z "$EDITOR" ]; then
|
||||
echo 'Need to set the $EDITOR environment variable to your favorite editor!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Patch Hunspell ($HUNSPELL_START --> $HUNSPELL_PATCHED)
|
||||
echo Patching Hunspell dictionary
|
||||
cp $HUNSPELL_START $HUNSPELL_PATCHED
|
||||
patch $HUNSPELL_PATCHED $HUNSPELL_DIFF
|
||||
|
||||
# Open the patched hunspell editor and let the user edit it
|
||||
echo "Now the dictionary is going to be opened for you to edit. When you're done, just quit the editor"
|
||||
echo -n "Press Enter to begin."
|
||||
read foo
|
||||
$EDITOR $HUNSPELL_PATCHED
|
||||
# Now, store the hunspell diff in the original diff file
|
||||
diff $HUNSPELL_START $HUNSPELL_PATCHED > $HUNSPELL_DIFF
|
||||
|
||||
# Clean up
|
||||
rm -f $HUNSPELL_PATCHED
|
0
extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/merge-dictionaries
Normal file → Executable file
0
extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/merge-dictionaries
Normal file → Executable file
Loading…
Reference in New Issue
Block a user