Skip to content

Instantly share code, notes, and snippets.

@masatoi
Created December 3, 2016 13:48
Show Gist options
  • Save masatoi/47fa4e3889af518dd003a515de9554dd to your computer and use it in GitHub Desktop.
Save masatoi/47fa4e3889af518dd003a515de9554dd to your computer and use it in GitHub Desktop.
#!/bin/sh
DDSKK_DIC=$HOME/.skk-jisyo
DDSKK_DIC_BACKUP=$HOME/.skk-jisyo.bak
UIMSKK_DIC=$HOME/.skk-uim-jisyo
UIMSKK_DIC_BACKUP=$HOME/.skk-uim-jisyo.bak
MERGED_DIC=/tmp/.skk-jisyo-merged
# merge dictionary
skkdic-expr2 $DDSKK_DIC $UIMSKK_DIC > $MERGED_DIC
# make backup
mv $DDSKK_DIC $DDSKK_DIC_BACKUP
mv $UIMSKK_DIC $UIMSKK_DIC_BACKUP
# copy merged dictionary
cp $MERGED_DIC $DDSKK_DIC
cp $MERGED_DIC $UIMSKK_DIC
# cleanup
rm $MERGED_DIC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment