aboutsummaryrefslogtreecommitdiffstats
path: root/Keywords/fontsdir.ucl
blob: d68b4a73999c67d32b74c78199a890b236228661 (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
# $FreeBSD$
#
# MAINTAINER: x11@FreeBSD.org

actions: [dir]
post-install: <<EOD
  case "%@" in
  /*) fontsdir="%@" ;;
  *) fontsdir="%D/%@" ;;
  esac
  mkfontscale ${fontsdir} 2>/dev/null || true
  mkfontdir ${fontsdir} 2>/dev/null || true
EOD
post-deinstall: <<EOD
  case "%@" in
  /*) fontsdir="%@" ;;
  *) fontsdir="%D/%@" ;;
  esac
  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