an, awi, cue and kue don't use the miibus interface.
[dragonfly.git] / contrib / smbfs / examples / print / lj6l
1 #!/bin/sh
2
3 # Sample input filter to print on HP Laser Jet printers
4 # Installed in /usr/local/libexec/hp6l
5
6 DEVICE="ljet3"
7 PAPERSIZE="a4"
8
9 printf "\033&k2G" || exit 2
10
11 read first_line
12 first_two_chars=`expr "$first_line" : '\(..\)'`
13
14 if [ "$first_two_chars" = "%!" ]; then
15         exec 3>&1 1>&2
16         /usr/local/bin/gs -sPAPERSIZE=${PAPERSIZE} -dSAFER -dNOPAUSE -q -sDEVICE=${DEVICE} \
17             -sOutputFile=/dev/fd/3 -  && exit 0
18 else
19         echo $first_line && cat && printf "\033&l0H" && exit 0
20 fi
21
22 exit 2