aboutsummaryrefslogtreecommitdiffstats
path: root/Keywords/fcfontsdir.ucl
blob: 280dd697b09d2359e0b59f7d8ccf86bd97da73b0 (plain) (blame)
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
# $FreeBSD$
#
# MAINTAINER: x11@FreeBSD.org

actions: [dir]
post-install: <<EOD
  case "%@" in
  /*) fontsdir="%@" ;;
  *) fontsdir="%D/%@" ;;
  esac
  fc-cache -s ${fontsdir} 2>/dev/null || true
  mkfontscale ${fontsdir} 2>/dev/null || true
  mkfontdir ${fontsdir} 2>/dev/null || true
EOD
post-deinstall: <<EOD
  case "%@" in
  /*) fontsdir="%@" ;;
  *) fontsdir="%D/%@" ;;
  esac
  fc-cache -s ${fontsdir} 2>/dev/null || true
  mkfontscale ${fontsdir} 2>/dev/null || true
  if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
    rm ${fontsdir}/fonts.scale
  fi
  mkfontdir ${fontsdir} 2>/dev/null || true
  if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
    rm ${fontsdir}/fonts.dir
  fi
EOD