This file is indexed.

prerm is in autokey-common 0.71.2-1.

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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/sh
# prerm script for test
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <prerm> `remove'
#        * <old-prerm> `upgrade' <new-version>
#        * <new-prerm> `failed-upgrade' <old-version>
#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
#        * <deconfigured's-prerm> `deconfigure' `in-favour'
#          <package-being-installed> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

# Automatically added by dh_installinit
if [ -x "/etc/init.d/autokey" ]; then
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d autokey stop || exit $?
	else
		/etc/init.d/autokey stop || exit $?
	fi
fi
# End automatically added section

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_pycentral
case "$1" in remove|upgrade)
	pkgremove=y
esac
if [ -f /var/lib/pycentral/autokey-common.pkgremove ] || [ -f /var/lib/pycentral/pkgremove ]; then
	pkgremove=y
fi
if [ "$pkgremove" = y ]; then
if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
	pycentral pkgremove autokey-common
else
	flist=$(tempfile)
	slist=$(tempfile)
	dpkg -L autokey-common | tee $flist | \
	while read n; do
	  case "$n" in
	    /usr/share/pyshared/*)
	      n2=${n#/usr/share/pyshared/*}
	      case "$n" in
		*.py) echo "p $n";;
		*) [ -d "$n" ] && echo "d $n2" || echo "f $n2"
	      esac
	      ;;
	    *) continue
	  esac
	done > $slist
	if [ -s $slist ]; then
	    for d in /usr/lib/python[0-9].[0-9]/????-packages; do
		case "$d" in */python2.1/*|*/python2.2/*) continue; esac
		while read t n; do
		    case "$t" in
			p) rm -f $d/$n $d/${n}[co];;
			d) rmdir $d/$n 2>/dev/null || true;;
			*) rm -f $d/$n
		    esac
		done < $slist
	    done
	fi
        awk '/\/usr\/share\/pyshared/ {next} /\.py$/ {print $0"c\n" $0"o"}' $flist \
	    | xargs -r rm -f >&2
	rm -f $flist $slist
fi
rm -f /var/lib/pycentral/autokey-common.pkgremove
fi
# End automatically added section


exit 0