summaryrefslogtreecommitdiffstats
path: root/Keywords/fcfontsdir.ucl
blob: 869526f5f53a9eb245c88efd69dccbf8a28c7dcd (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
# $FreeBSD$
#
# MAINTAINER: x11@FreeBSD.org

actions: [dir]
post-install: <<EOD
  case "%@" in
  /*) fontsdir="%@" ;;
  *) fontsdir="%D/%@" ;;
  esac
  fc-cache -fs ${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 -fs ${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
OpenPOWER on IntegriCloud