2 # Make links named `lcircle10' for all TFM and GF/PK files, if no
3 # lcircle10 files already exist.
5 # Don't override definition of prefix and/or libdir if they are
6 # already defined in the environment.
7 if test "z${prefix}" = "z" ; then
10 # prefix may contain references to other variables, thanks to make.
11 eval prefix
=\""${prefix}"\"
14 if test "z${libdir}" = "z" ; then
15 libdir
="${prefix}/lib/tex"
17 # libdir may contain references to other variables, thanks to make.
18 eval libdir
=\""${libdir}"\"
22 texfontdir
="${texlibdir}/fonts"
24 # Directories for the different font formats, in case they're not all
25 # stored in one place.
26 textfmdir
="${textfmdir-${texfontdir}}"
27 texpkdir
="${texpkdir-${texfontdir}}"
28 texgfdir
="${texgfdir-${texfontdir}}"
30 test "z${TMPDIR}" = "z" && TMPDIR
="/tmp"
32 tempfile
="${TMPDIR}/circ$$"
33 tempfile2
="${TMPDIR}/circ2$$"
35 # EXIT SIGHUP SIGINT SIGQUIT SIGTERM
36 #trap 'rm -f "${tempfile}" "${tempfile2}"' 0 1 2 3 15
38 # Find all the fonts with names that include `circle'.
39 (cd "${texfontdir}"; find .
-name '*circle*' -print > "${tempfile}")
41 # If they have lcircle10.tfm, assume everything is there, and quit.
42 if grep 'lcircle10\.tfm' "${tempfile}" > /dev
/null
2>&1 ; then
43 echo "Found lcircle10.tfm."
47 # No TFM file for lcircle. Make a link to circle10.tfm if it exists,
48 # and then make a link to the bitmap files.
49 grep 'circle10\.tfm' "${tempfile}" > "${tempfile2}" \
51 echo "I can't find any circle fonts in ${texfontdir}.
52 If it isn't installed somewhere else, you need to get the Metafont sources
53 from somewhere, e.g., labrea.stanford.edu:pub/tex/latex/circle10.mf, and
54 run Metafont on them."
58 # We have circle10.tfm. (If we have it more than once, take the first
59 # one.) Make the link.
60 tempfile2_line1
="`sed -ne '1p;q' \"${tempfile2}\"`"
61 ln "${tempfile2_line1}" "${textfmdir}/lcircle10.tfm"
62 echo "Linked to ${tempfile2_line1}."
64 # Now make a link for the PK files, if any.
66 for f
in `grep 'circle10.*pk' "${tempfile}"` ; do
68 | sed -ne '/\//!s/^/.\//;s/\(.*\)\/\([^\/][^\/]*\)$/\1 \2/;p'`
74 # And finally for the GF files.
76 for f
in `grep 'circle10.*gf' "${tempfile}"` ; do
78 | sed -ne '/\//!s/^/.\//;s/\(.*\)\/\([^\/][^\/]*\)$/\1 \2/;p'`