Codebase list fonts-arabeyes / af0502a
Drop preinst for obsolete defoma Hideki Yamane 3 years ago
1 changed file(s) with 0 addition(s) and 40 deletion(s). Raw diff Collapse all Expand all
+0
-40
debian/preinst less more
0 #!/bin/sh
1
2 set -e
3
4 VERSION=2.0-6
5 PKG=ttf-arabeyes
6 FILE=/etc/defoma/hints/${PKG}.hints
7
8 # Remove a no-longer used conffile
9 rm_conffile() {
10 local PKGNAME="$1"
11 local CONFFILE="$2"
12 [ -e "$CONFFILE" ] || return 0
13
14 local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
15 local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \
16 sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
17 if [ "$md5sum" != "$old_md5sum" ]; then
18 echo "Obsolete conffile $CONFFILE has been modified by you."
19 echo "Saving as $CONFFILE.dpkg-bak ..."
20 mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
21 else
22 echo "Removing obsolete conffile $CONFFILE ..."
23 rm -f "$CONFFILE"
24 fi
25 }
26
27 case "$1" in
28 install|upgrade)
29 if dpkg --compare-versions "$2" lt-nl "$VERSION"; then
30 if [ -f $FILE ]; then
31 if [ -x /usr/bin/defoma-font ]; then
32 defoma-font purge-all $FILE || true
33 fi
34 fi
35 rm_conffile $PKG $FILE
36 fi
37 esac
38
39 #DEBHELPER#