2
# preinst script for t1-thai-tlwg
4
# see: dh_installdeb(1)
8
# summary of how this script can be called:
9
# * <new-preinst> `install'
10
# * <new-preinst> `install' <old-version>
11
# * <new-preinst> `upgrade' <old-version>
12
# * <old-preinst> `abort-upgrade' <new-version>
14
# For details see /usr/share/doc/packaging-manual/
16
# Remove obsolete conffile
20
[ -e "$CONFFILE" ] || return 0
22
local md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
23
local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME \
24
| sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
25
if [ "$md5sum" != "$old_md5sum" ]; then
26
echo "Obsolete conffile $CONFFILE has been modified by you."
27
echo "Saving as $CONFFILE.dpkg-bak ..."
28
mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
30
echo "Removing obsolete conffile $CONFFILE ..."
37
if dpkg --compare-versions "$2" lt-nl "1:0.4.13-3"; then
38
HINTS_FILE="/etc/defoma/hints/t1-thai-tlwg.hints"
39
if [ -f $HINTS_FILE ] && [ -x /usr/bin/defoma-font ]; then
40
defoma-font purge-all $HINTS_FILE || true
42
rm_conffile t1-thai-tlwg $HINTS_FILE
50
echo "preinst called with unknown argument \`$1'" >&2
55
# dh_installdeb will replace this with shell code automatically
56
# generated by other debhelper scripts.