2002-02-15 00:34:13 +01:00
|
|
|
#!/bin/sh
|
2002-06-04 23:55:42 +02:00
|
|
|
#
|
2003-01-07 03:07:47 +01:00
|
|
|
# $XFree86: xc/lib/fontconfig/setfontdirs,v 1.5 2002/12/17 03:26:36 dawes Exp $
|
2002-06-04 23:55:42 +02:00
|
|
|
#
|
2003-01-07 03:07:47 +01:00
|
|
|
LC_ALL=C
|
|
|
|
export LC_ALL
|
2002-02-15 00:34:13 +01:00
|
|
|
FONTDIRS=fontdirs$$
|
|
|
|
trap "rm $FONTDIRS" 0
|
2002-05-21 19:08:42 +02:00
|
|
|
sh ./findfonts ${1+"$@"} > $FONTDIRS
|
2002-02-15 00:34:13 +01:00
|
|
|
cp fonts.conf.in fonts.conf
|
|
|
|
chmod +w fonts.conf
|
2002-12-17 04:26:36 +01:00
|
|
|
EDITOR=ed
|
|
|
|
(echo q | ed) > /dev/null 2>&1
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
EDITOR=ex
|
|
|
|
(echo q | ex) > /dev/null 2>&1
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "$0: *** Error: Cannot find 'ed' or 'ex' editor"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
$EDITOR fonts.conf << EOF
|
2002-02-15 00:34:13 +01:00
|
|
|
/FONTPATH_END/a
|
2002-05-21 19:08:42 +02:00
|
|
|
<!-- Font directory list configured on `date` -->
|
2002-02-15 00:34:13 +01:00
|
|
|
.
|
|
|
|
+r $FONTDIRS
|
|
|
|
a
|
2002-08-01 18:17:33 +02:00
|
|
|
<dir>~/.fonts</dir>
|
2002-02-15 00:34:13 +01:00
|
|
|
|
|
|
|
.
|
|
|
|
/FONTPATH_START/,/FONTPATH_END/d
|
2002-08-01 18:17:33 +02:00
|
|
|
|
2002-02-15 00:34:13 +01:00
|
|
|
w
|
|
|
|
q
|
|
|
|
EOF
|
|
|
|
|