File: python2.4-xmms.prerm

package info (click to toggle)
pyxmms 2.04-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 312 kB
  • ctags: 191
  • sloc: ansic: 1,340; python: 657; makefile: 99; sh: 57
file content (29 lines) | stat: -rw-r--r-- 773 bytes parent folder | download | duplicates (4)
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
#! /bin/sh -e
#
# Debian prerm script for Python x.y hierarchical modules
# Written by Gregor Hoffleit <flight@debian.org>
# Extended by Matthias Klose <doko@debian.org>
# Modified by Florent Rougon <frn@debian.org>

PACKAGE=`basename $0 .prerm`

case "$1" in
    remove|upgrade|deconfigure)
        dpkg --listfiles $PACKAGE | \
            awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | \
            xargs rm -f >&2
        ;;
    # I don't think we should do something here: the old package is
    # half-removed and the new one not unpacked at all. If
    # "<old-prerm>upgrade<new-version>" failed, it can't work better here!
    failed-upgrade)
        ;;
    *)
        echo "prerm called with unknown argument '$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0