Filewatcher File Search
FTP Search
  
Directory 
  
Content Search 
   
pkg://abook_0.6.0~pre2-1_i386.deb:79952/postinst  info  downloads

#!/bin/sh -e
# postinst for abook

# 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

# 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
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2009 MARUHN Internet Solutions