File: postinst

package info (click to toggle)
serpento 0.3.6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 292 kB
  • ctags: 381
  • sloc: python: 1,644; ansic: 666; perl: 157; sh: 116; makefile: 72
file content (49 lines) | stat: -rw-r--r-- 855 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
39
40
41
42
43
44
45
46
47
48
49
#! /bin/sh -e
#
# postinst script for Debian python packages.
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
#

PACKAGE=`basename $0 .postinst`
PV=2.1
PYTHON=python$PV
LOGFILE=/var/log/serpento.log
DIRLIST=/usr/lib/serpento


case "$1" in
    configure|abort-upgrade|abort-remove|abort-deconfigure)

        for i in $DIRLIST ; do
            /usr/bin/$PYTHON -O /usr/lib/python$PV/compileall.py -q $i
            /usr/bin/$PYTHON /usr/lib/python$PV/compileall.py -q $i
        done

    ;;

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

case "$1" in
    configure)

        touch $LOGFILE
        chown serpento:adm $LOGFILE
        chmod 644 $LOGFILE
        
        if [ -x /usr/sbin/dictdconfig ]; then 
            /usr/sbin/dictdconfig -w 
        fi

    ;;
esac


#DEBHELPER#

exit 0