debian: new upstream point release
[git/debian.git] / debian / git.postrm
blob73732fbb2860a37e3e1818da71eb352a9b4fb45c
1 #!/bin/sh
2 set -e
4 # Snippet based on dpkg-maintscript-helper from dpkg 1.15.8.
5 # Postinst explains why.
6 rm_conffile () {
7 CONFFILE=$1; shift
8 if test "$1" = purge; then
9 rm -f "$CONFFILE.dpkg-bak" "$CONFFILE.dpkg-remove" \
10 "$CONFFILE.dpkg-backup"
11 return
14 test "$1" = abort-install || test "$1" = abort-upgrade || return 0
15 dpkg --compare-versions "$2" lt-nl "$3" || return 0
16 if test -e "$CONFFILE.dpkg-remove"; then
17 echo "Reinstalling $CONFFILE that was moved away"
18 mv "$CONFFILE.dpkg-remove" "$CONFFILE"
20 if test -e "$CONFFILE.dpkg-backup"; then
21 echo "Reinstalling $CONFFILE that was backed up"
22 mv "$CONFFILE.dpkg-backup" "$CONFFILE"
26 rm_conffile /etc/bash_completion.d/git "$1" "$2" '1:1.8.0-1~'
28 # Now /etc/emacs/site-start.d/50git-core.el belongs to the
29 # git-el package.
31 # NOTE: this leaves behind a /etc/emacs/site-start.d/50git-core.el
32 # file if it was modified while the broken 1.7.4.1-1 package
33 # was installed. Installing and purging git-el works around
34 # that.
35 rm_conffile /etc/emacs/site-start.d/50git-core.el "$1" "$2" '1:1.7.4.1-2~'