File: preinst

package info (click to toggle)
iportuguese 19980611-2
  • links: PTS
  • area: main
  • in suites: potato, woody
  • size: 472 kB
  • ctags: 1
  • sloc: sh: 62; makefile: 40
file content (34 lines) | stat: -rw-r--r-- 898 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
# preinst of package iportuguese
# Written by Rafael Laboissiere <rafael@icp.inpg.fr> on 21 Jun 1998 

# This script is needed for cleaning up `portugues.{hash,aff}'
# introduced by version 19950819-4

set -e

case "$1" in
    upgrade)     
        if dpkg --compare-versions $2 '=' 19950819-4 ; then \
          if [ -n "`update-alternatives --display ispell-dictionary.hash \
                   | grep portugues | grep 999`" ]; then \
            update-alternatives --remove ispell-dictionary.hash \
              /usr/lib/ispell/portugues.hash > /dev/null
            update-ispell-dictionary
          else
            update-alternatives --remove ispell-dictionary.hash \
              /usr/lib/ispell/portugues.hash > /dev/null
          fi
        fi
        ;;
    abort-upgrade | install)
	;;
    *)
	echo "$0: incorrect arguments: $*" >&2
	exit 1
	;;
esac

#DEBHELPER#

exit 0