File: dpkg-python.postinst

package info (click to toggle)
dpkg-scriptlib 0.1-2hamm1
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 188 kB
  • ctags: 230
  • sloc: python: 1,685; perl: 534; makefile: 41; sh: 18
file content (23 lines) | stat: -rw-r--r-- 528 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
#! /bin/sh -e
#
# Debian postinst script for Python 1.5 hierarchical modules
# Written by Gregor Hoffleit <flight@debian.org>
#

NAME=dpkg-python
#DIRLIST="/usr/lib/site-python/dpkg"
DIRLIST="/usr/lib/python/dpkg"

case "$1" in
    configure|abort-upgrade|abort-remove|abort-deconfigure)
	for i in $DIRLIST ; do
	    python -O /usr/lib/python1.5/compileall.py -q $i
	    python /usr/lib/python1.5/compileall.py -q $i
	done
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac