File: python2.1-pymacs.postinst

package info (click to toggle)
pymacs 0.22-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,020 kB
  • ctags: 340
  • sloc: python: 2,519; lisp: 460; makefile: 120; sh: 113
file content (37 lines) | stat: -rw-r--r-- 887 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
#! /bin/sh -e
#
# postinst script for Debian python packages.
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
#
VERSION=2.1
DIRLIST="/usr/lib/python$VERSION/site-packages/Pymacs"



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

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



## Alternatives

if [ "$1" = "configure" ]; then
    # update-alternatives on things that collide
    update-alternatives --install /usr/bin/pymacs-services pymacs-services /usr/bin/pymacs-services.python$VERSION 10
    update-alternatives --install /usr/bin/rebox rebox /usr/bin/rebox.python$VERSION 10
fi

#DEBHELPER#

exit 0