#!/bin/sh
# printer output to HP Deskjet 550C
# possible devices: cdj550 deskjet
FNAME=`basename $1`
cp $1 /tmp/$FNAME
# normalerweise -sDEVICE=$2
gs -q -dNOPAUSE -sDEVICE=cdj550 -sOutputFile=/tmp/grout.$FNAME /tmp/$FNAME\
 > /dev/null && rm -f /tmp/$FNAME &
while [ -f /tmp/$FNAME ]
do
	sleep 2
done
lpr -h -Praw /tmp/grout.$FNAME
rm -f /tmp/grout.$FNAME
