#!/bin/sh

TEMPDIC=/tmp/make-mazegaki.$$
MAZEGAKIDIR=/usr/lib/make-mazegaki

if [ ! -f certain ]; then
    echo "certain: No such file."
    exit 1
elif [ ! -f uncertain ]; then
    echo "uncertain: No such file."
    exit 1
fi

$MAZEGAKIDIR/reduce certain uncertain < $MAZEGAKIDIR/pd_kihon.yom > $TEMPDIC
$MAZEGAKIDIR/combine $MAZEGAKIDIR/greece.maz $MAZEGAKIDIR/jukujiku.maz \
    $TEMPDIC > ./mazegaki.dic

rm -f $TEMPDIC

echo
echo "mazegaki.dic created."
echo "Move this file to your tcode-data-directory."
