Debian Codegraph @

debian/mercurial.postrm

raw
1 #!/bin/sh
2 # postrm script for mercurial
3 #
4 # see: dh_installdeb(1)
5
6 set -e
7
8 # summary of how this script can be called:
9 # * <postrm> `remove'
10 # * <postrm> `purge'
11 # * <old-postrm> `upgrade' <new-version>
12 # * <new-postrm> `failed-upgrade' <old-version>
13 # * <new-postrm> `abort-install'
14 # * <new-postrm> `abort-install' <old-version>
15 # * <new-postrm> `abort-upgrade' <old-version>
16 # * <disappearer's-postrm> `disappear' <overwriter>
17 # <overwriter-version>
18 # for details, see http://www.debian.org/doc/debian-policy/ or
19 # the debian-policy package
20
21
22 case "$1" in
23 purge)
24 for conffile in hgext.rc; do
25 # we mimic dpkg as closely as possible, so we remove configuration
26 # files with dpkg backup extensions too:
27 ### Some of the following is from Tore Anderson:
28 for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist .ucf-old .ucf-new .ucf-dist; do
29 rm -f /etc/mercurial/hgrc.d/$conffile$ext
30 done
31 # remove the configuration file itself
32 rm -f /etc/mercurial/hgrc.d/$conffile
33 # and finally clear it out from the ucf database
34 if which ucf >/dev/null; then
35 ucf --purge /etc/mercurial/hgrc.d/$conffile
36 fi
37 if which ucfr >/dev/null; then
38 ucfr --purge mercurial /etc/mercurial/hgrc.d/$conffile
39 fi
40 done
41
42 ;;
43
44 remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
45 ;;
46
47 *)
48 echo "postrm called with unknown argument \`$1'" >&2
49 exit 1
50 ;;
51 esac
52
53 # dh_installdeb will replace this with shell code automatically
54 # generated by other debhelper scripts.
55
56 #DEBHELPER#
57
58 exit 0
59
60