File: postinst

package info (click to toggle)
python 1.5.2-10potato11
  • links: PTS
  • area: main
  • in suites: potato
  • size: 13,340 kB
  • ctags: 36,680
  • sloc: ansic: 97,117; python: 88,266; makefile: 2,518; lisp: 2,363; sh: 882
file content (38 lines) | stat: -rw-r--r-- 875 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
28
29
30
31
32
33
34
35
36
37
38
#! /bin/sh -e
#
# postinst script for the Debian python-base package.
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
#

PACKAGE=python-base
DIRLIST="/usr/lib/python1.5"

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
        mkdir -p /usr/local/lib/python1.5/site-packages || true
        mkdir -p /usr/local/lib/site-python || true
	
        ldconfig

	# Install a symlink for /usr/doc/python
        if [ -d /usr/doc -a ! -e /usr/doc/python -a -d /usr/share/doc/python ]; then
                ln -sf ../share/doc/python /usr/doc/python
        fi
    ;;

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


#DEBHELPER#


exit 0