File: imagemagick-doc.preinst

package info (click to toggle)
imagemagick 8%3A6.9.11.60%2Bdfsg-1.6%2Bdeb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 76,816 kB
  • sloc: ansic: 349,503; cpp: 21,804; xml: 11,029; perl: 6,417; sh: 5,877; makefile: 3,042; tcl: 459
file content (38 lines) | stat: -rw-r--r-- 987 bytes parent folder | download | duplicates (5)
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
#!/bin/sh

set -e

# remove old dpkg-backup; remove after strech+2
case "$1" in
    upgrade|install)
	version=$2
	if dpkg --compare-versions -- "$version" le "8:6.9.2.10+dfsg-1~"; then
	    if test -h /usr/share/doc/imagemagick-doc/images.dpkg-backup; then
		if test $(readlink /usr/share/doc/imagemagick-doc/images.dpkg-backup) = "../imagemagick/images"; then
		    rm -f /usr/share/doc/imagemagick-doc/images.dpkg-backup
		fi
	    fi

	    if test -h /usr/share/doc/imagemagick-doc/www.dpkg-backup; then
		if test $(readlink /usr/share/doc/imagemagick-doc/www.dpkg-backup) = "../imagemagick/www"; then
		    rm -f /usr/share/doc/imagemagick-doc/www.dpkg-backup
		fi
	    fi
	fi
    ;;
    abort-upgrade)
    ;;
    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac




# remove after strech+2
dpkg-maintscript-helper \
	dir_to_symlink /usr/share/doc/imagemagick-doc /usr/share/doc/imagemagick-6-common 8:6.9.2.10+dfsg-1~  -- "$@"

#DEBHELPER#