]> arthur.barton.de Git - netatalk.git/blob - etc/psf/etc2ps.sh
- merge branch-netatalk-afp-3x-dev, HEAD was tagged before
[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         TEMPFILE=`mktemp -t psfilter.XXXXXX` || exit 1
30         cat > $TEMPFILE
31         $DVIPS $DVIPSARGS < $TEMPFILE
32         rm -f $TEMPFILE
33     else
34         echo "$0: filter dvips uninstalled" 1>&2
35         exit 2
36     fi
37     ;;
38
39 #
40 # troff2ps is from psroff by Chris Lewis.
41 #
42 tf*)
43     if [ -x "$TROFF2PS" ]; then
44         exec $TROFF2PS $TROFF2PSARGS
45     else
46         echo "$0: filter troff2ps uninstalled" 1>&2
47         exit 2
48     fi
49     ;;
50
51 *)
52     echo "$0: filter $1 unavailable" 1>&2
53     exit 2
54     ;;
55 esac
56
57 exit 0