gspipeijs 949 B

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