File: pythonPVER-4suite.prerm

package info (click to toggle)
python-4suite 0.99cvs20050418-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,824 kB
  • ctags: 18
  • sloc: sh: 499; makefile: 183
file content (27 lines) | stat: -rw-r--r-- 574 bytes parent folder | download
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
#! /bin/sh -e
#
# sample prerm script for Debian python2 packages.
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
#

VERSION=@PVER@
PACKAGE=python$VERSION-4suite
BINAPPS=@BINAPPS@
SHAREAPPS=@SHAREAPPS@

dpkg --listfiles $PACKAGE |
	awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
	xargs -r rm -f >&2

if [ $1 != "upgrade" ]; then
    # Remove alternatives

    for i in $BINAPPS; do
        update-alternatives --remove $i /usr/bin/$i.$PACKAGE
    done
    for i in $SHAREAPPS; do
    	update-alternatives --remove $i /usr/share/4Suite/$i.$PACKAGE
    done
fi

#DEBHELPER#