Skip to content

Instantly share code, notes, and snippets.

@melissaboiko
Created December 29, 2010 14:23
Show Gist options
  • Save melissaboiko/758576 to your computer and use it in GitHub Desktop.
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 .
#!/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