1 |
#! /bin/sh -e |
#! /bin/bash -e |
|
# postinst script for python-gnue-base |
|
2 |
# |
# |
3 |
# see: dh_installdeb(1) |
# postinst script for Debian python packages. |
4 |
|
# Written 1998 by Gregor Hoffleit <flight@debian.org>. |
|
# summary of how this script can be called: |
|
|
# * <postinst> `configure' <most-recently-configured-version> |
|
|
# * <old-postinst> `abort-upgrade' <new version> |
|
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package> |
|
|
# <new-version> |
|
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' |
|
|
# <failed-install-package> <version> `removing' |
|
|
# <conflicting-package> <version> |
|
|
# for details, see /usr/share/doc/packaging-manual/ |
|
5 |
# |
# |
|
# quoting from the policy: |
|
|
# Any necessary prompting should almost always be confined to the |
|
|
# post-installation script, and should be protected with a conditional |
|
|
# so that unnecessary prompting doesn't happen if a package's |
|
|
# installation fails and the `postinst' is called with `abort-upgrade', |
|
|
# `abort-remove' or `abort-deconfigure'. |
|
6 |
|
|
7 |
DIRLIST="/usr/lib/python1.5/site-packages/gnue" |
PACKAGE=gnue-common |
8 |
|
DIRLIST="/usr/lib/gnue/lib/python/gnue" |
9 |
|
|
10 |
case "$1" in |
case "$1" in |
11 |
configure|abort-upgrade|abort-remove|abort-deconfigure) |
configure|abort-upgrade|abort-remove|abort-deconfigure) |
12 |
for i in $DIRLIST ; do |
|
13 |
python -O /usr/lib/python1.5/compileall.py -q $i |
# byte-compile the Python source files |
14 |
python /usr/lib/python1.5/compileall.py -q $i |
for i in $DIRLIST ; do |
15 |
done |
/usr/bin/python2.1 /usr/lib/python2.1/compileall.py -q $i |
16 |
|
done |
17 |
|
|
18 |
|
# If we don't have a connections.conf, create one from the template |
19 |
|
if [ ! -f /etc/gnue/connections.conf ]; then |
20 |
|
cp /etc/gnue/sample.connections.conf /etc/gnue/connections.conf |
21 |
|
fi |
22 |
;; |
;; |
23 |
|
|
24 |
*) |
*) |
25 |
echo "postinst called with unknown argument \`$1'" >&2 |
echo "postinst called with unknown argument \`$1'" >&2 |
26 |
exit 1 |
exit 1 |
27 |
;; |
;; |
28 |
esac |
esac |
29 |
|
|
|
# dh_installdeb will replace this with shell code automatically |
|
|
# generated by other debhelper scripts. |
|
|
|
|
30 |
#DEBHELPER# |
#DEBHELPER# |
31 |
|
|
32 |
exit 0 |
exit 0 |
|
|
|
|
|
|