]> arthur.barton.de Git - netatalk.git/blob - etc/psf/etc2ps.sh
Initial revision
[netatalk.git] / etc / psf / etc2ps.sh
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 DVIPSPATH=/usr/local/tex/bin
13 DVIPS=/usr/local/tex/bin/dvips
14 DVIPSARGS="-f -q"
15
16 TROFF2PS=/usr/local/psroff/troff2/troff2ps
17 TROFF2PSARGS="-Z -O-.10"
18
19 PATH=/usr/bin:$DVIPSPATH; export PATH
20
21 case $1 in
22
23 #
24 # Use "dvips" by Radical Eye Software to convert TeX DVI files to PostScript.
25 # Note that you *must* have METAFONT, etc, in your path.
26 #
27 df*)
28     if [ -x "$DVIPS" ]; then
29         cat > /tmp/psfilter.$$
30         $DVIPS $DVIPSARGS < /tmp/psfilter.$$
31         rm -f /tmp/psfilter.$$
32     else
33         echo "$0: filter dvips uninstalled" 1>&2
34         exit 2
35     fi
36     ;;
37
38 #
39 # troff2ps is from psroff by Chris Lewis.
40 #
41 tf*)
42     if [ -x "$TROFF2PS" ]; then
43         exec $TROFF2PS $TROFF2PSARGS
44     else
45         echo "$0: filter troff2ps uninstalled" 1>&2
46         exit 2
47     fi
48     ;;
49
50 *)
51     echo "$0: filter $1 unavailable" 1>&2
52     exit 2
53     ;;
54 esac
55
56 exit 0