File: python2.3-exo0.3.postinst

package info (click to toggle)
exo 0.3.107-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,992 kB
  • ctags: 3,447
  • sloc: ansic: 24,999; sh: 10,429; makefile: 1,606; python: 403; perl: 235; xml: 130
file content (33 lines) | stat: -rw-r--r-- 948 bytes parent folder | download | duplicates (3)
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
#!/bin/bash -e
#
# Debian postinst script for Python x.y hierarchical modules
# Written by Gregor Hoffleit <flight@debian.org>
# Extended by Matthias Klose <doko@debian.org>
# Modified by Benedikt Meurer <bm@os-cillation.de>
#

PACKAGE=`basename $0 | sed -e 's/\.[^.]*$//'`
PV=`dpkg --listfiles $PACKAGE | sed -n -e '/^\/usr\/lib\/python.*\//{
  s,/usr/lib/python\([0-9][0-9.]*\)/.*,\1,p
  q
}'`

case "$1" in
    configure|abort-upgrade|abort-remove|abort-deconfigure)
	# Get the priority of this packages pygtk.py module
    	pyver=`echo $PACKAGE|sed -ne 's/python\([0-9]\)\.\([0-9]\).*/\1\2/p'`
	priority=$((100 + ${pyver:-0}))

    	# Install the pygtk.py alternative
	update-alternatives \
	  --install /usr/lib/python$PV/site-packages/pyexo.py py${PV}exo.py \
	  /usr/lib/python$PV/site-packages/pyexo.py.$PACKAGE $priority
    ;;

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

#DEBHELPER#