File: PVER-minimal.postrm.in

package info (click to toggle)
python2.5 2.5-5%2Betch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 52,452 kB
  • ctags: 96,908
  • sloc: ansic: 352,790; python: 317,047; sh: 17,465; asm: 6,564; makefile: 4,300; lisp: 3,678; perl: 3,674; xml: 894; objc: 756; sed: 2
file content (25 lines) | stat: -rw-r--r-- 646 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
#! /bin/sh -e

if [ "$1" = "remove" ]; then

    (find /usr/lib/@PVER@ -name '*.py[co]' | xargs rm -f {}) 2>/dev/null || true

    for d in `find /usr/lib/@PVER@ -depth -type d -empty 2> /dev/null`; do \
        while rmdir $d 2> /dev/null; do d=`dirname $d`; done; \
    done

    if [ -f /var/lib/python/@PVER@_installed ]; then
	rm -f /var/lib/python/@PVER@_installed
	rmdir --ignore-fail-on-non-empty /var/lib/python 2>/dev/null
    fi
fi

if [ "$1" = "purge" ]; then
    for d in `find /usr/lib/@PVER@ -depth -type d -empty 2> /dev/null`; do \
        while rmdir $d 2> /dev/null; do d=`dirname $d`; done; \
    done
fi

#DEBHELPER#

exit 0