This file is indexed.

postinst is in fontconfig 2.11.94-0ubuntu1.1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
#!/bin/sh

set -e

if [ "$1" = triggered ]; then
  # Force regeneration of all fontconfig cache files.
  mkdir -p /var/cache/fontconfig
  fc-cache -s -v 1>/var/log/fontconfig.log 2>&1 || printf "fc-cache failed.\nSee /var/log/fontconfig.log for more information.\n"
  exit 0
fi

  

if [ "$1" = configure ]; then
  if dpkg --compare-versions "$2" lt-nl 2.4.0-1; then
  printf "Cleaning up old fontconfig caches... "
  for dir in /usr/share/fonts /var/lib/defoma/fontconfig.d /usr/X11R6/lib/X11/fonts /usr/local/share/fonts ; do
  	if [ -d $dir ]; then
	    find $dir -name fonts.cache-1 -exec rm -f \{\} \;
	    find $dir -depth -mindepth 1 -type d -exec rmdir --ignore-fail-on-non-empty \{\} \;
	fi
  done
  printf "done.\n"
  fi
  # Force regeneration of all fontconfig cache files.
  mkdir -p /var/cache/fontconfig
  printf "Regenerating fonts cache... "
  fc-cache -s -f -v 1>/var/log/fontconfig.log 2>&1 || (printf "failed.\nSee /var/log/fontconfig.log for more information.\n"; exit 1)
  printf "done.\n"

  if dpkg --compare-versions "$2" lt-nl 2.10.1-0ubuntu1; then  
    if [ -d /etc/fonts/conf.avail ]; then
      rmdir --ignore-fail-on-non-empty /etc/fonts/conf.avail
    fi
  fi

fi