pcclone.new 659 B

12345678910111213141516171819202122
  1. #!/bin/rc
  2. if (! ~ $DEBUG '') flag x +
  3. if (~ $OUTDEV -) OUTDEV=/fd/1
  4. # make a place for pc's to spool files that is private
  5. ramfs
  6. mkdir /tmp/log /tmp/prob /tmp/queue
  7. bind -b /tmp/log $LPLIB/log
  8. bind -b /tmp/prob $LPLIB/prob
  9. bind -b /tmp/queue $LPLIB/queue
  10. if (~ $#* 0) {
  11. @{bind -b $LPLIB/process /bin; $LPPROC} | aux/download -f -H/sys/lib/postscript/font -mfontmap -plw+ > $OUTDEV
  12. if (! ~ $LPDEST stdout) echo -n `{ascii -t 4} > $OUTDEV
  13. }
  14. if not {
  15. for (i in $*) {
  16. @{bind -b $LPLIB/process /bin; $LPPROC} < $i | aux/download -f -H/sys/lib/postscript/font -mfontmap -plw+ > $OUTDEV
  17. if (! ~ $LPDEST stdout) echo -n `{ascii -t 4} > $OUTDEV
  18. }
  19. }
  20. exit ''