This file is indexed.

postinst is in abook 0.5.6-7.1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh -e
# postinst for abook
# copyright 2003-2009 by Gerfried Fuchs <rhonda@debian.at>
# Licenced under BSD style

# Source debconf library.
if [ -e /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule
fi

action=$1
if [ "${DEBCONF_RECONFIGURE}" = "1" ]; then
	# workaround until reconfigure is really available
	action=reconfigure
fi
version=$2

# if we got reinstalled after a remove, enable the config snippet again
if [ "$action" = 'configure' ] && [ -e /etc/Muttrc.d/abook.rc.removed ] && [ ! -e /etc/Muttrc.d/abook.rc ]; then
	mv /etc/Muttrc.d/abook.rc.removed /etc/Muttrc.d/abook.rc || true
fi

# fix for #394532 breakage
if grep "abook --mutt-query '%s'" /etc/Muttrc.d/abook.rc >/dev/null 2>/dev/null ; then
	sed -i "s/abook --mutt-query '%s'/abook --mutt-query %s/" /etc/Muttrc.d/abook.rc
fi

# only on new install, upgrade from < 0.5.6 or reconfigure
if dpkg --compare-versions "$version" lt "0.5.6" || [ "$action" = "reconfigure" ]; then
	mutt=true
	if [ -e /usr/share/debconf/confmodule ]; then
		db_get abook/muttrc.d
		mutt="$RET"
	fi

	case "$mutt" in
	    true)
		if [ ! -e /etc/Muttrc.d/abook.rc ] ; then
			mkdir /etc/Muttrc.d 2> /dev/null || true
			cat > /etc/Muttrc.d/abook.rc << EOF
set query_command="abook --mutt-query %s"
macro pager A |'abook --add-email'\n
EOF
		fi
		;;
	    false)
		rm /etc/Muttrc.d/abook.rc 2> /dev/null || true
		rmdir /etc/Muttrc.d 2> /dev/null || true
		;;
	esac
fi


# menu entry
if [ "$action" = 'configure' ] && [ -x /usr/bin/update-menus ]; then
	update-menus
fi