File: aspell-de.preinst

package info (click to toggle)
igerman98 20161207-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 2,528 kB
  • ctags: 184
  • sloc: perl: 926; makefile: 498; sh: 108; sed: 32
file content (45 lines) | stat: -rw-r--r-- 1,184 bytes parent folder | download | duplicates (6)
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
#! /bin/sh
# preinst script for aspell-de

set -e

# summary of how this script can be called:
#        * <new-preinst> `install'
#        * <new-preinst> `install' <old-version>
#        * <new-preinst> `upgrade' <old-version>
#        * <old-preinst> `abort-upgrade' <new-version>

case "$1" in
    install|upgrade)
	# Sarge shipped with the files in /usr/lib/aspell-0.60
	if dpkg --compare-versions "$2" lt-nl 0.60-20030222-1-4 ; then
	    # if the user changed the link, remember the status
	    unset LANG LC_MESSAGES LC_ALL
	    if update-alternatives --display de.multi | grep -q 'status is manual' &&
		update-alternatives --display de.multi | grep -q 'points to.*-neu' ; then
		    echo "Preserving old alternative de.multi -> aspell-de"
		    echo neu > /var/lib/aspell/de.multi.alternative-neu
	    fi

	    # remove the old links
	    update-alternatives --remove de.multi /usr/lib/aspell-0.60/de-neu.multi || :
	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

# vim:sw=4: