debian/postrm
author Paul Crowley <paul@lshift.net>
Wed, 11 Nov 2009 14:41:30 +0000
branchdebian
changeset 204 d46ef29ab17a
parent 116 d99f3169828a
child 224 caf9cb61f856
permissions -rw-r--r--
Merge in makefile changes, update to DESTDIR
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
97
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     1
#!/bin/sh
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     2
# postrm script for mercurial-server
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     3
#
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     4
# see: dh_installdeb(1)
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     5
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     6
set -e
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     7
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     8
# summary of how this script can be called:
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     9
#        * <postrm> `remove'
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    10
#        * <postrm> `purge'
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    11
#        * <old-postrm> `upgrade' <new-version>
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    12
#        * <new-postrm> `failed-upgrade' <old-version>
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    13
#        * <new-postrm> `abort-install'
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    14
#        * <new-postrm> `abort-install' <old-version>
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    15
#        * <new-postrm> `abort-upgrade' <old-version>
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    16
#        * <disappearer's-postrm> `disappear' <overwriter>
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    17
#          <overwriter-version>
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    18
# for details, see http://www.debian.org/doc/debian-policy/ or
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    19
# the debian-policy package
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    20
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    21
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    22
case "$1" in
116
d99f3169828a Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents: 97
diff changeset
    23
    purge)
d99f3169828a Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents: 97
diff changeset
    24
        deluser --quiet --system hg > /dev/null || true
d99f3169828a Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents: 97
diff changeset
    25
        delgroup --quiet --system hg > /dev/null || true
d99f3169828a Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents: 97
diff changeset
    26
    ;;
d99f3169828a Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents: 97
diff changeset
    27
d99f3169828a Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents: 97
diff changeset
    28
    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
97
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    29
    ;;
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    30
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    31
    *)
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    32
        echo "postrm called with unknown argument \`$1'" >&2
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    33
        exit 1
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    34
    ;;
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    35
esac
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    36
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    37
# dh_installdeb will replace this with shell code automatically
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    38
# generated by other debhelper scripts.
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    39
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    40
#DEBHELPER#
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    41
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    42
exit 0
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    43
7953788881a4 Start work on Debianization
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    44