mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
35 lines
1.1 KiB
Bash
35 lines
1.1 KiB
Bash
#!/bin/bash
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#
|
|
# 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
|