blob: f12c5a16c547b54571c59713603c458ec5efdd11 (
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.4 2003/12/20 10:04:32 jmmv 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} >fonts.dir 2>/dev/null )
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
|