Debian Codegraph @

debian/preinst

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 set -e
4
5 VERSION=2.2-1
6 PKG=ttf-oldstandard
7 FILE=/etc/defoma/hints/${PKG}.hints
8
9 # Remove a no-longer used conffile
10 rm_conffilescip-shell shell fonts-oldstandard 2.2really-4 rm_conffile().() {
11 local PKGNAME="$1"
12 local CONFFILE="$2"
13 [scip-shell system . . `[`. -e "$CONFFILE" ] || return 0
14
15 local md5sum="$(md5sumscip-shell system . . md5sum. $CONFFILE | sedscip-shell system . . sed. -e 's/ .*//')"
16 local old_md5sum="$(dpkg-queryscip-shell system . . dpkg-query. -W -f='${Conffiles}' $PKGNAME | \
17 sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
18 if [scip-shell system . . `[`. "$md5sum" != "$old_md5sum" ]; then
19 echoscip-shell system . . echo. "Obsolete conffile $CONFFILE has been modified by you."
20 echoscip-shell system . . echo. "Saving as $CONFFILE.dpkg-bak ..."
21 mvscip-shell system . . mv. -f "$CONFFILE" "$CONFFILE".dpkg-bak
22 else
23 echoscip-shell system . . echo. "Removing obsolete conffile $CONFFILE ..."
24 rmscip-shell system . . rm. -f "$CONFFILE"
25 fi
26 }
27
28 case "$1" in
29 install|upgrade)
30 if dpkgscip-shell system . . dpkg. --compare-versions "$2" lt-nl "$VERSION"; then
31 if [scip-shell system . . `[`. -f $FILE ]; then
32 if [scip-shell system . . `[`. -x /usr/bin/defoma-fontscip-shell filesystem . . `/usr/bin/defoma-font`. ]; then
33 defoma-font purge-all $FILE || truescip-shell system . . true.
34 fi
35 fi
36 rm_conffilescip-shell shell fonts-oldstandard 2.2really-4 rm_conffile(). $PKG $FILE
37 fi
38 esac
39
40 #DEBHELPER#