XSLTools

Annotated packages/ubuntu-hoary/python2.4-xsltools/debian/postinst

522:44f29f525fc7
2006-03-12 paulb [project @ 2006-03-12 22:37:41 by paulb] Made the non-installed package and examples override any installed software.
paulb@312 1
#! /bin/sh 
paulb@312 2
# postinst script for XSLTools
paulb@312 3
#
paulb@312 4
# see: dh_installdeb(1)
paulb@312 5
paulb@312 6
set -e
paulb@312 7
paulb@312 8
# summary of how this script can be called:
paulb@312 9
#        * <postinst> `configure' <most-recently-configured-version>
paulb@312 10
#        * <old-postinst> `abort-upgrade' <new version>
paulb@312 11
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
paulb@312 12
#          <new-version>
paulb@312 13
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
paulb@312 14
#          <failed-install-package> <version> `removing'
paulb@312 15
#          <conflicting-package> <version>
paulb@312 16
# for details, see http://www.debian.org/doc/debian-policy/ or
paulb@312 17
# the debian-policy package
paulb@312 18
#
paulb@312 19
# quoting from the policy:
paulb@312 20
#     Any necessary prompting should almost always be confined to the
paulb@312 21
#     post-installation script, and should be protected with a conditional
paulb@312 22
#     so that unnecessary prompting doesn't happen if a package's
paulb@312 23
#     installation fails and the `postinst' is called with `abort-upgrade',
paulb@312 24
#     `abort-remove' or `abort-deconfigure'.
paulb@312 25
paulb@312 26
PACKAGE=python2.4-xsltools
paulb@312 27
VERSION=2.4
paulb@312 28
LIB="/usr/lib/python$VERSION"
paulb@312 29
DIRLIST="$LIB/site-packages/XSLForms $LIB/site-packages/XSLTools"
paulb@312 30
paulb@312 31
case "$1" in
paulb@312 32
    configure|abort-upgrade|abort-remove|abort-deconfigure)
paulb@312 33
        for i in $DIRLIST ; do
paulb@312 34
            /usr/bin/python$VERSION -O $LIB/compileall.py -q $i
paulb@312 35
            /usr/bin/python$VERSION $LIB/compileall.py -q $i
paulb@312 36
        done
paulb@312 37
    ;;
paulb@312 38
paulb@312 39
    *)
paulb@312 40
        echo "postinst called with unknown argument \`$1'" >&2
paulb@312 41
        exit 1
paulb@312 42
    ;;
paulb@312 43
esac
paulb@312 44
paulb@312 45
paulb@312 46
paulb@312 47
exit 0
paulb@312 48
paulb@312 49