File: devhelp-book-gtk2.preinst

package info (click to toggle)
devhelp-books 0.5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,168 kB
  • ctags: 24
  • sloc: sh: 66; python: 64; makefile: 42
file content (37 lines) | stat: -rw-r--r-- 1,027 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/bash

set -e

# removes the links that were present on earlier versions
# of this package

if [ "$1" = "upgrade" ] || [ "$1" = "install" ]; then
    if [ -n "$2" ]; then
	if dpkg --compare-versions "$2" le "0.2-8"; then
	    test -L /usr/share/devhelp/books/atk-1.0 && \
		rm -f /usr/share/devhelp/books/atk-1.0
	    
	    test -L /usr/share/devhelp/books/gdk-2.0 && \
		rm -rf /usr/share/devhelp/books/gdk-2.0
	    
	    test -L /usr/share/devhelp/books/gdk-pixbuf-2.0 && \
		rm -rf /usr/share/devhelp/books/gdk-pixbuf-2.0
	    
	    test -L /usr/share/devhelp/books/gtk-2.0 && \
		rm -rf /usr/share/devhelp/books/gtk-2.0
	    
	    test -L /usr/share/devhelp/books/glib-2.0 && \
		rm -rf /usr/share/devhelp/books/glib-2.0
	    
	    test -L /usr/share/devhelp/books/gobject-2.0 && \
		rm -rf /usr/share/devhelp/books/gobject-2.0
	    
	    test -L /usr/share/devhelp/books/pango-1.0 && \
		rm -rf /usr/share/devhelp/books/pango-1.0
	fi

    fi
    true # avoid breaking the script because of the tests
fi

#DEBHELPER#