File: postinst

package info (click to toggle)
vice 1.19-1etch1
  • links: PTS
  • area: contrib
  • in suites: etch
  • size: 27,132 kB
  • ctags: 33,406
  • sloc: ansic: 257,145; cpp: 13,395; sh: 3,674; makefile: 3,380; perl: 1,801; yacc: 622; lex: 258; asm: 4
file content (24 lines) | stat: -rw-r--r-- 692 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -e

#echo $0 "$@"
#set -x

#DEBHELPER#

if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 0.14.2.70-1; then
    DIVERSIONS=/var/lib/dpkg/diversions
    [ -r "$DIVERSIONS" ] || DIVERSIONS=/var/state/dpkg/diversions
    [ -r "$DIVERSIONS" ] || DIVERSIONS=""
   
    [ "$DIVERSIONS" ] && {
	echo "Attempting to clear out the old diversions..."
	sed -n 's@^\(/usr/lib/vice/.*\)[.]distrib$@\1@p' < $DIVERSIONS | \
	xargs -i dpkg-divert --remove --rename {}
    } || {
	echo "There was a problem removing the diversions (has dpkg changed?);"
	echo "you may want to make sure that there are no (local) diversions"
	echo "under /usr/lib/vice/ .  [sorry!]"
	sleep 5
    }
fi