File: prerm

package info (click to toggle)
sdc 1.0.8beta-8
  • links: PTS
  • area: contrib
  • in suites: slink
  • size: 1,400 kB
  • ctags: 874
  • sloc: lisp: 8,120; ansic: 967; makefile: 671; perl: 136; sh: 50
file content (34 lines) | stat: -rw-r--r-- 744 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
#!/bin/sh

set -e

case "$1" in
    upgrade)
	## SGML INTEGRATION
	# do not bother to remove unless we're downgrading to before we had this
	if dpkg --compare-versions 0.8-4 gt ${2}; then
	    install-sgmlcatalog --remove sdc
	fi
	## DOC-BASE INTEGRATION
	# might think about conditionalizing this too
	if command -v install-docs >/dev/null 2>&1; then
	    install-docs -r sdc
	    install-docs -r sdc-man
	fi
	;;
    remove|failed-upgrade|deconfigure)
	install-info --quiet --remove sdc
	install-sgmlcatalog --remove sdc
	## DOC-BASE INTEGRATION
	if command -v install-docs >/dev/null 2>&1; then
	    install-docs -r sdc
	    install-docs -r sdc-man
	fi
	;;

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

exit 0