#! /bin/sh
# Shell file to convert various formats to Mif
#
# Edit as needed to execute other filters; 
# The cases below should match the contents of file .fminit2.0/suffixlist 
#
# Three filters are provided with standard Maker: One reads files with the
# suffix ".txtalt" and converts them to mif, attempting to recognize paragraphs.
# The second reads and converts MML files. See the Reference Manual for
# more information.  The third filter converts old format documents into
# mif so they can be read by FrameMaker 2.0.
#
# Inputs are:
# $1 = input file to be filtered (full path, example: /usr/drf/foo.bar )
# $2 = output file from filter   (full path, example: /usr/drf/foo.tmp )
# $3 = input file's path         (           example: /usr/drf         )
# $4 = .fminit2.0's directory
# $5 = maker's bin directory
#
# See what the file type is, and run the appropriate program
case $1 in
        *.txtalt) $5/txttomif <$1 >$2;;
        *.mml) $5/mmltomif -I$3 -I~ -I$4 <$1 >$2;;
	*#D13)
		# This is a fake suffix for Maker's use.
		dr=`expr "$1" : '\(.*\)#D13'`
		$5/1.3binarytomif "$dr" "$2"
		;;
esac
