]> arthur.barton.de Git - netatalk.git/blob - etc/psf/etc2ps.sh.in
Auto-generate etc2ps.sh.
[netatalk.git] / etc / psf / etc2ps.sh.in
1 #!/bin/sh
2 #
3 # This filter is called by psf to convert "other" formats to PostScript.
4 # psf handles text and PostScript native.  "Other" formats, e.g. DVI, C/A/T,
5 # need to be converted before the page reverser and the printer can use
6 # them.
7 #
8 # $0 begins with the filter name, e.g. df, tf.  Each format is a separate
9 # tag in the case.
10 #
11
12 DVIPS=@DVIPS@
13 DVIPSARGS="-f -q"
14
15 TROFF2PS=@TROFF2PS@
16 TROFF2PSARGS="-Z -O-.10"
17
18 case $1 in
19
20 #
21 # Use "dvips" by Radical Eye Software to convert TeX DVI files to PostScript.
22 # Note that you *must* have METAFONT, etc, in your path.
23 #
24 df*)
25     if [ -x "$DVIPS" ]; then
26         cat > /tmp/psfilter.$$
27         $DVIPS $DVIPSARGS < /tmp/psfilter.$$
28         rm -f /tmp/psfilter.$$
29     else
30         echo "$0: filter dvips uninstalled" 1>&2
31         exit 2
32     fi
33     ;;
34
35 #
36 # troff2ps is from psroff by Chris Lewis.
37 #
38 tf*)
39     if [ -x "$TROFF2PS" ]; then
40         exec $TROFF2PS $TROFF2PSARGS
41     else
42         echo "$0: filter troff2ps uninstalled" 1>&2
43         exit 2
44     fi
45     ;;
46
47 *)
48     echo "$0: filter $1 unavailable" 1>&2
49     exit 2
50     ;;
51 esac
52
53 exit 0