File: preinst

package info (click to toggle)
boa-constructor 0.3.0-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,188 kB
  • ctags: 8,857
  • sloc: python: 54,163; sh: 66; makefile: 36
file content (37 lines) | stat: -rw-r--r-- 748 bytes parent folder | download | duplicates (2)
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
# preinst script for boa-constructor

set -e

case "$1" in
    install|upgrade)
        if [ "$1" = "upgrade" ]
        then
	    if dpkg --compare-versions "$2" lt "2.8-1"
		then
                # this a fix because the prerm scripts of boa-constructor <= 0.2.8-1
	        # were buggy
	        # I'm precise with what I delete in Plug-ins, because there may be plugins
		rm -f /usr/share/boa-constructor/Plug-ins/__init__.py*
		rm -f /usr/share/boa-constructor/ExternalLib/*.*
		rm -f /usr/share/boa-constructor/Views/*.*
		rm -f /usr/share/boa-constructor/*.*
	    fi
        fi
    ;;

    abort-upgrade)
    ;;

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


#DEBHELPER#

exit 0