blob: 649cc0ae0fef26e6d3f28c43e82a63f40dfa15a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# $NetBSD: fonts,v 1.5 2004/03/30 11:55:02 recht Exp $
#
# Handle font databases; used by fonts.mk.
#
FONTS_TTF="@FONTS_TTF@"
FONTS_TTF_DIRS="@FONTS_TTF_DIRS@"
FONTS_TYPE1="@FONTS_TYPE1@"
FONTS_TYPE1_DIRS="@FONTS_TYPE1_DIRS@"
FONTS_X11="@FONTS_X11@"
FONTS_X11_DIRS="@FONTS_X11_DIRS@"
TTMKFDIR="@TTMKFDIR@"
TYPE1INST="@TYPE1INST@"
MKFONTDIR="@MKFONTDIR@"
case ${STAGE} in
POST-INSTALL|POST-DEINSTALL)
${ECHO} "===> Updating font databases"
if [ "${FONTS_TTF}" = "YES" ]; then
for d in ${FONTS_TTF_DIRS}; do
if [ -z "`cd $d ; ${LS} | ${GREP} -v .pkgsrc | ${GREP} -v ^fonts | ${GREP} -v ^Fontmap`" ]; then
${RM} -f $d/fonts* $d/Fontmap*
else
( cd $d && ${TTMKFDIR} -o fonts.dir >/dev/null 2>&1 )
fi
done
fi
if [ "${FONTS_TYPE1}" = "YES" ]; then
for d in ${FONTS_TYPE1_DIRS}; do
if [ -z "`cd $d ; ${LS} | ${GREP} -v .pkgsrc | ${GREP} -v ^fonts | ${GREP} -v ^Fontmap`" ]; then
${RM} -f $d/fonts* $d/Fontmap*
else
( cd $d && ${TYPE1INST} >/dev/null 2>&1 )
fi
done
fi
if [ "${FONTS_X11}" = "YES" ]; then
for d in ${FONTS_X11_DIRS}; do
if [ -z "`cd $d ; ${LS} | ${GREP} -v .pkgsrc | ${GREP} -v ^fonts | ${GREP} -v ^Fontmap`" ]; then
${RM} -f $d/fonts* $d/Fontmap*
else
( cd $d && ${MKFONTDIR} >/dev/null 2>&1 )
fi
done
fi
;;
esac
|