#!/bin/sh
# lgftontk.sh - create file.ntk from file.lgf
USAGE="usage: $0 file.lgf"

case $# in
  1) file=$1
     ;;
  *) echo $USAGE 
     exit 1
     ;;
esac

temp=lgftontk$$.cnf
trap 'rm -f $temp; exit 1' 1 2 15

echo include diglog.cnf >$temp
echo do load $file >>$temp
# perform the action
echo do logntk >>$temp
echo do exit >>$temp
diglog -c $temp
retval=$?
rm -f $temp
exit $retval
