Created
December 29, 2010 14:23
-
-
Save melissaboiko/758576 to your computer and use it in GitHub Desktop.
simple script to update to latest edict (JMdict). I put it in /etc/cron.daily .
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
tmp="$(mktemp)" | |
dest="/usr/share/edict/edict.utf8" | |
function cleanup() | |
{ | |
rm -f "$tmp" | |
} | |
trap cleanup EXIT | |
wget -c -t 20 -q -O - http://ftp.monash.edu.au/pub/nihongo/edict.gz > "$tmp" | |
gunzip -c "$tmp" | iconv -f euc-jp -t utf-8 > "$dest" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment