rconfig: Add a script for setting up a HAMMER/UEFI system.
[dragonfly.git] / share / examples / printing / psdfX
blob43bdc4100bdb165cebe434dbe1e50d7876839967
1 #!/bin/sh
3 # psdf - DVI to PostScript printer filter
4 # Installed in /usr/local/libexec/psdf
6 # Invoked by lpd when user runs lpr -d
9 orig_args="$@"
11 fail() {
12 echo "$@" 1>&2
13 exit 2
16 while getopts "x:y:n:h:" option; do
17 case $option in
18 x|y) ;; # Ignore
19 n) login=$OPTARG ;;
20 h) host=$OPTARG ;;
21 *) echo "LPD started `basename $0` wrong." 1>&2
22 exit 2
24 esac
25 done
27 [ "$login" ] || fail "No login name"
28 [ "$host" ] || fail "No host name"
30 ( /u/kelly/freebsd/printing/filters/make-ps-header $login $host "DVI File"
31 /usr/local/bin/dvips -f ) | eval /usr/local/libexec/lprps $orig_args