ref: f0f2d452c873255dec4b3359b3f93e349be0f2c5
dir: /sys/lib/lp/process/gspipeijs/
#!/bin/rc # extended to IJS driver by K.Okamoto # duble-sided printing for PSC 2550 printer # if (! ~ $DEBUG '') flag x + # usage: gspipeijs [dev] # assumes postscript on stdin switch($#*) { case 0 MODEL=`{echo $LPCLASS | sed 's/(.*\+)?gsijs!([^+]*)(\+.*)?/\2/'} NUMBER=`{echo $LPCLASS | sed 's/(.*\+)?gsijs!([^+]*)\+(.*)?/\3/'} case 1 IJS=$1 case * echo 'usage: gspipeijs [dev]' >[1=2] exit gspipeijs } GSTMPFILE=/tmp/gsp$pid switch($NUMBER) { case 2100 GSOPT=(-q -sDEVICE'='ijs -sIjsServer'='hpijs -sDeviceManufacturer'='HP '-sDeviceModel='"$MODEL^' '^$NUMBER" -r600 -sOutputFile'='^$GSTMPFILE -sPAPERSIZE'='a4 -dIjsUseOutputFD -dSAFER -dNOPAUSE -DBATCH) case 2500 GSOPT=(-q -sDEVICE'='ijs -sIjsServer'='hpijs -sDeviceManufacturer'='HP '-sDeviceModel='"$MODEL^' '^$NUMBER" -r600 -sOutputFile'='^$GSTMPFILE -dDuplex'='true -sPAPERSIZE'='a4 -dIjsUseOutputFD -dSAFER -dNOPAUSE -DBATCH) } gs $GSOPT - cat $GSTMPFILE rm $GSTMPFILE exit