File: omniorb.preinst

package info (click to toggle)
omniorb 1%3A3.0.4.1-8
  • links: PTS
  • area: main
  • in suites: woody
  • size: 13,024 kB
  • ctags: 19,172
  • sloc: cpp: 80,906; python: 17,895; ansic: 17,630; yacc: 3,441; lex: 1,306; sh: 1,191; xml: 871; perl: 383; makefile: 108; tcl: 18
file content (51 lines) | stat: -rw-r--r-- 1,086 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
50
51
#! /bin/sh
# preinst script for omniorb

set -e

case "$1" in
    install)
    ;;

    upgrade)
	if dpkg --compare-versions $2 '<' 1:3.0.4.1; then
	    if dpkg --compare-versions $2 '<' 1:3.0.3-1; then
		if [ -f /etc/omniorb.cfg ] ; then
		    rm /etc/omniorb.cfg
		fi
	    else
		if [ -f /etc/omniORB.cfg ] ; then
		    rm /etc/omniORB.cfg
		fi
	    fi

	    if dpkg --compare-versions $2 '<' 1:3.0.4-2.2; then
		find /usr/lib/python1.5/site-packages/omniidl_be -name *.pyo | xargs rm
		find /usr/lib/python1.5/site-packages/omniidl -name *.pyo | xargs rm
	    else
		find /usr/lib/python2.1/site-packages/omniidl_be -name *.pyo | xargs rm
		find /usr/lib/python2.1/site-packages/omniidl -name *.pyo | xargs rm
	    fi
	fi
	if dpkg --compare-versions $2 '<' 1:3.0.4.1-8; then
	    update-rc.d -f omniorb remove >/dev/null
	fi
    ;;

    abort-upgrade)
    ;;

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

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0