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
|
#!/bin/sh
# $Id: postinst 154 2008-11-11 10:14:45Z robert $
# postinst for doc-base
# Abort if any command returns an error value
set -e
package=doc-base
# upgrades prior to this version require complete re-registration
compat_ver=0.8.17
VERBOSE=
ctrldir="/usr/share/$package"
infodir="/var/lib/$package/info"
docsdir="/var/lib/$package/documents"
if [ "$DEBUG" ]; then
echo entering $package postinst
set -x
fi
reinstall_docs () {
install-docs ${VERBOSE} "--install-$1"
}
case "$1" in
configure)
if dpkg --compare-versions "$2" lt-nl "$compat_ver" ||
[ ! -f "$infodir/status.db" ]; then
# version is less than last compatable version, we need to
# re-register all the docs
reinstall_docs all
else
reinstall_docs changed
fi
;;
triggered)
if [ -f "$infodir/status.db" ]; then
reinstall_docs changed
else
echo "doc-base seems not to be configured yet, skipping triggers run"
fi
;;
esac
#DEBHELPER#
exit 0
|