Debian Codegraph @

debian/fonts-ipafont-gothic.postinst

raw
1 #!/bin/sh
2 #
3 # see: dh_installdeb(1)
4
5 set -e
6
7 # font alternatives
8 ALT_GOTHIC_NAME="fonts-japanese-gothic"
9 GOTHIC_FONT_ENTRY="/usr/share/fonts/opentype/ipafont-gothic/ipag.ttf"
10 FONT_PRIORITY=100
11
12 add_alternate_gothic_font_entry()
13 {
14 update-alternatives --install \
15 /usr/share/fonts/truetype/$ALT_GOTHIC_NAME.ttf \
16 $ALT_GOTHIC_NAME.ttf \
17 $GOTHIC_FONT_ENTRY \
18 $FONT_PRIORITY
19 }
20
21
22 # summary of how this script can be called:
23 # * <postinst> `configure' <most-recently-configured-version>
24 # * <old-postinst> `abort-upgrade' <new version>
25 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
26 # <new-version>
27 # * <postinst> `abort-remove'
28 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
29 # <failed-install-package> <version> `removing'
30 # <conflicting-package> <version>
31 # for details, see http://www.debian.org/doc/debian-policy/ or
32 # the debian-policy package
33
34
35 case "$1" in
36 configure)
37 if [ ! -e /usr/share/fonts/truetype ]; then
38 mkdir /usr/share/fonts/truetype
39 fi
40
41 # alternatives
42 add_alternate_gothic_font_entry
43 ;;
44
45 abort-upgrade|abort-remove|abort-deconfigure)
46 ;;
47
48 *)
49 echo "postinst called with unknown argument \`$1'" >&2
50 exit 1
51 ;;
52 esac
53
54 # dh_installdeb will replace this with shell code automatically
55 # generated by other debhelper scripts.
56
57 #DEBHELPER#
58
59 exit 0