3 # kpsetool. Script to make teTeX-style kpsetool, kpsexpand and kpsepath
4 # available. Web2C's kpsewhich offers a superset of the functionality.
5 # For compatibilty with old versions of teTeX, this script provides the
6 # old command line interface of kpsetool, kpsexpand and kpsepath. All the
7 # real work is done inside Web2C's kpsewhich.
8 # Thomas Esser <te@dbs.uni-hannover.de>, Mar 1997, public domain.
13 Usage: kpsexpand [options] string
14 Usage: kpsetool -w [options] pathtype filename
15 Usage: kpsepath [options] pathtype
17 Valid options are the following:
18 -n progname : pretend to be progname to kpathsea
19 -m mode : set Metafont mode
20 -w : locate files (similar to kpsewhich)
21 -p : act like kpsepath
22 -v : act like kpsexpand
25 gf : generic font bitmap
26 pk : packed bitmap font
27 base : Metafont memory dump
28 bib : BibTeX bibliography source
29 bst : BibTeX style files
30 cnf : Kpathsea runtime configuration files
32 mem : MetaPost memory dump
34 mfpool : Metafont program strings
36 mppool : MetaPost program strings
37 mpsupport : MetaPost support files
38 pict : Other kinds of figures
40 texpool : TeX program strings
41 tfm : TeX font metrics
43 dvips_config : dvips config files
44 dvips_header : dvips header files
45 troff_font : troff fonts
50 */kpsewhich
) action
=kpsewhich
;;
51 */kpsepath
) action
=kpsepath
;;
54 progname
=`echo $0 | sed 's@.*/@@'`
61 echo "$progname: missing argument for -n."
64 flags
="$flags -progname=$2"; shift; shift
68 echo "$progname: missing argument for -m."
71 flags
="$flags -mode=$2"; shift; shift
73 x-w
) action
=kpsewhich
; shift;;
74 x-p
) action
=kpsepath
; shift;;
75 x-v
) action
=kpsexpand
; shift;;
85 base
) format
='.base';;
92 mfpool
) format
='.pool';;
94 mppool
) format
='.pool';;
95 mpsupport
) format
='MetaPost support';;
98 texpool
) format
='.pool';;
101 dvips_config
) format
='dvips config';;
102 dvips_header
) format
='.pro';;
103 troff_font
) format
='Troff fonts';;
104 *) echo "$progname: $1: unknown format"; echo "$usage"; exit 1;;
111 test $# = 1 ||
{ echo "$progname: missing filename"; echo "$usage"; exit 1; }
112 kpsewhich
$flags -format="$format" "$1";;
114 kpsewhich
$flags -show-path="$format";;
116 test $# = 1 ||
{ echo "$progname: missing string"; echo "$usage"; exit 1; }
117 kpsewhich
$flags -expand-var="$1";;