home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-User.iso / usr / lib / NextPrinter / Server / lpd.comm < prev    next >
Text File  |  1995-04-12  |  887b  |  31 lines

  1. #!/bin/sh
  2. # lpd interface script for prserver.
  3. # We use sh instead of csh here because it is faster.  Especially, no .cshrc.
  4. # Note that this script is NOT used with the "if" case.
  5.  
  6. # Make sure we do not get the wrong TranScript filter.
  7. PATH=/bin:/usr/bin:/usr/ucb:/usr/lib/transcript
  8. export PATH
  9.  
  10. # Cannot pass file parameter through to prserver.  It will be hooked up to stdin.
  11. while test $# != 0; do
  12.     case "$1" in
  13.     -f) FILE=$2; shift;;
  14.     -p) PRINTER=$2; shift;;
  15.     -n) USER=$2; shift;;
  16.     -h) HOST=$2; shift;;
  17.     *) ;;
  18.     esac
  19.     shift
  20. done
  21.  
  22. PRSERVER="/usr/lib/NextPrinter/Server/prserver -p $PRINTER -n $USER -h $HOST -f -"
  23. FILTER=`basename $0`
  24. case $FILTER in
  25.     pstf) pscat | $PRSERVER;;
  26.     psgf) psplot | $PRSERVER;;
  27.     psnf) psdit | $PRSERVER;;
  28.     psdf) psbad $FILTER $PRINTER $USER $HOST | $PRSERVER;;
  29.     psvf|pscf|psrf) psbad $FILTER $PRINTER $USER $HOST | $PRSERVER;;
  30. esac
  31.