#! /bin/sh
#
# CUPS wrapper script for dvips
#

# Copy stdin to a temp file as necessary...
if test $# -lt 6; then
	filename=$TMPDIR/$$.dvi
	cat >$filename
else
	filename=$6
fi

# Run dvips to convert to PostScript, sending the output to stdout...
dvips -R -q -o - $filename

# Remove temp file as necessary...
if test $# -lt 6; then
	rm -f $filename
fi
