mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
f5bc5997b2
src/share/doc/handbook/printing.sgml with src/tools/tools/epfe/epfe.pl
32 lines
652 B
Bash
32 lines
652 B
Bash
#!/bin/sh
|
|
#
|
|
# psdf - DVI to PostScript printer filter
|
|
# Installed in /usr/local/libexec/psdf
|
|
#
|
|
# Invoked by lpd when user runs lpr -d
|
|
#
|
|
|
|
orig_args="$@"
|
|
|
|
fail() {
|
|
echo "$@" 1>&2
|
|
exit 2
|
|
}
|
|
|
|
while getopts "x:y:n:h:" option; do
|
|
case $option in
|
|
x|y) ;; # Ignore
|
|
n) login=$OPTARG ;;
|
|
h) host=$OPTARG ;;
|
|
*) echo "LPD started `basename $0` wrong." 1>&2
|
|
exit 2
|
|
;;
|
|
esac
|
|
done
|
|
|
|
[ "$login" ] || fail "No login name"
|
|
[ "$host" ] || fail "No host name"
|
|
|
|
( /u/kelly/freebsd/printing/filters/make-ps-header $login $host "DVI File"
|
|
/usr/local/bin/dvips -f ) | eval /usr/local/libexec/lprps $orig_args
|