summarylogtreecommitdiffstats
path: root/fontconfig-ubuntu.install
blob: 363aff0eebed2ea7f447f1362b9ef9398bd7a715 (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
post_upgrade() {
  if (( "$(vercmp "$2" 2:2.13.93-1)" < 0 )); then
    printf '%s\n' 'Creating fontconfig configuration...'
    find usr/share/fontconfig/conf.default -mindepth 1 |
      /usr/share/libalpm/scripts/40-fontconfig-config /etc/fonts/conf.d

    (( "$(vercmp "$2" 0)" > 0 )) && cat <<END

>>> If you have configured NoExtract to prevent symlinks in /etc/fonts/conf.d/
    from being restored, these symlinks have been recreated one last time. You
    can now delete the symlinks and remove the paths from NoExtract and they
    will not be created again.

END
  fi

  # a full forced directory scan is required here
  printf '%s\n' 'Rebuilding fontconfig cache...'
  /usr/bin/fc-cache -rs
}

post_install() {
  post_upgrade "$1" 0
}