preinst is in fonts-ipaexfont-gothic 00301-2ubuntu2.
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 | #!/bin/sh
set -e
VERSION=00103-1
VERSION_2=00103-3
VERSION_3=00103-6
OLD_ALT_NAME=ttf-japanese-gothic
FONT_ENTRY=/usr/share/fonts/opentype/ipaexfont/ipaexg.ttf
FONT_ENTRY_2=/usr/share/fonts/opentype/ipaexfont/ipaexg.ttf
FONT_ENTRY_3=/usr/share/fonts/opentype/fonts-ipaexfont-gothic/ipaexg.ttf
case "$1" in
install|upgrade)
if dpkg --compare-versions "$2" lt-nl "$VERSION"; then
# remove old alternative otf symlinks.
update-alternatives --remove $OLD_ALT_NAME.otf $FONT_ENTRY
fi
if dpkg --compare-versions "$2" lt-nl "$VERSION_2"; then
if [ -d /usr/share/fonts/opentype/ipaexfont ]; then
update-alternatives --remove $OLD_ALT_NAME.ttf $FONT_ENTRY_2
fi
fi
if dpkg --compare-versions "$2" lt-nl "$VERSION_3"; then
if [ -d /usr/share/fonts/opentype/fonts-ipaexfont-gothic ]; then
update-alternatives --remove $OLD_ALT_NAME.ttf $FONT_ENTRY_3
fi
fi
esac
exit 0
|