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

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

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

echo include diglog.cnf >$temp
echo do load $file >>$temp
echo cstop off >>$temp
echo power on >>$temp
echo do exit >>$temp

diglog -c $temp
retval=$?
rm -f $temp
exit $retval
