File: prerm

package info (click to toggle)
python-gtk 0.5.3-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,604 kB
  • ctags: 4,295
  • sloc: ansic: 19,390; python: 8,220; makefile: 91; sh: 26
file content (22 lines) | stat: -rw-r--r-- 571 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/bash -e
#
# Debian prerm script for Python x.y hierarchical modules
# Written by Gregor Hoffleit <flight@debian.org>
# Extended by Matthias Klose <doko@debian.org>
#

PACKAGE=`basename $0 | sed -e 's/\.[^.]*$//'`
PV=`dpkg --listfiles $PACKAGE | sed -n -e '/^\/usr\/lib\/python.*\//{
  s,/usr/lib/python\([0-9][0-9.]*\)/.*,\1,p
  q
}'`

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

#if [ -f /usr/share/doc-base/$PACKAGE ]; then
#    if command -v install-docs >/dev/null 2>&1; then
#	install-docs -r $PACKAGE
#    fi
#fi