1#!/bin/rc 2# extended to IJS driver by K.Okamoto 3# duble-sided printing for PSC 2550 printer 4# 5if (! ~ $DEBUG '') flag x + 6 7# usage: gspipeijs [dev] 8# assumes postscript on stdin 9 10switch($#*) { 11case 0 12 MODEL=`{echo $LPCLASS | sed 's/(.*\+)?gsijs!([^+]*)(\+.*)?/\2/'} 13 NUMBER=`{echo $LPCLASS | sed 's/(.*\+)?gsijs!([^+]*)\+(.*)?/\3/'} 14case 1 15 IJS=$1 16case * 17 echo 'usage: gspipeijs [dev]' >[1=2] 18 exit gspipeijs 19} 20 21GSTMPFILE=/tmp/gsp$pid 22 23switch($NUMBER) { 24case 2100 25 GSOPT=(-q -sDEVICE'='ijs -sIjsServer'='hpijs -sDeviceManufacturer'='HP '-sDeviceModel='"$MODEL^' '^$NUMBER" -r600 -sOutputFile'='^$GSTMPFILE -sPAPERSIZE'='a4 -dIjsUseOutputFD -dSAFER -dNOPAUSE -DBATCH) 26case 2500 27 GSOPT=(-q -sDEVICE'='ijs -sIjsServer'='hpijs -sDeviceManufacturer'='HP '-sDeviceModel='"$MODEL^' '^$NUMBER" -r600 -sOutputFile'='^$GSTMPFILE -dDuplex'='true -sPAPERSIZE'='a4 -dIjsUseOutputFD -dSAFER -dNOPAUSE -DBATCH) 28} 29 30gs $GSOPT - 31 32cat $GSTMPFILE 33rm $GSTMPFILE 34 35exit 36