#!/bin/sh
# install into /usr/lib/cups/backend/etxps

# name of the backend filter
NAME=`basename ${0}`

# check number of arguments (embodied in $#):
case $# in
	0)
		echo "file elpr \"Unknown\" \"elpr\""
		exit 0
		;;
	5)
		INPUT=$6
		break
		;;
	6)
		INPUT=$6
		break
		;;
	*)
		echo "Wrong number of arguments"
		echo "Usage: $NAME job-id user title copies options [file]"
		exit 1
		;;
esac

# pipe RIB file to renderer on stdin.
# pipe output to stderr to log in CUPS.

JOB=$1
USER=$2
TITLE=$3
COPIES=$4
OPTIONS=$5
FILE=$6

/usr/bin/elpr -vvv -user $USER -display CUPS -n $COPIES $FILE

