use the right version of python in the maintainer scripts
[mirror/userdir-ldap.git] / debian / postinst
1 #! /bin/bash -e
2 #
3 # Debian postinst script for Python hierarchical modules
4 # Written by Gregor Hoffleit <flight@debian.org>
5 #
6
7 PYTHON_VER="2.1"
8 DIRLIST="/usr/lib/python$PYTHON_VER/site-packages"
9
10 case "$1" in
11     configure|abort-upgrade|abort-remove|abort-deconfigure)
12         for i in $DIRLIST ; do
13             python -O /usr/lib/python$PYTHON_VER/compileall.py -q $i
14             python /usr/lib/python$PYTHON_VER/compileall.py -q $i
15         done
16     ;;
17
18     *)
19         echo "postinst called with unknown argument \`$1'" >&2
20         exit 1
21     ;;
22 esac