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
|
#!/bin/sh
set -e
case "$1" in
configure)
# continue below
;;
abort-upgrade|abort-remove|abort-deconfigure)
exit 0;
;;
*)
echo "postinst called with unknown argument \`$1'" >&2;
exit 0;
;;
esac
# original config file was missing the `$' characters on the variable names
# insert them if necessary
if [ -f /etc/emacspeak.conf ]; then
sed 's/^if *\[ *"DTK/if \[ "$DTK/' /etc/emacspeak.conf >/etc/temp.$$
mv /etc/temp.$$ /etc/emacspeak.conf
if grep 'export' /etc/emacspeak.conf >/dev/null; then
true;
else
cat >>/etc/emacspeak.conf <<\EOF
export DTK_PROGRAM DTK_PORT DTK_TCL
EOF
fi
fi
emacspeakconfig -i
#DEBHELPERdefeated# not included since not using dh_installdeb.
# including the script fragments manually instead:
install-info --quiet --section "Emacs" "Emacs" \
--description="Speech output for Emacs." /usr/share/info/emacspeak.info
/usr/lib/emacsen-common/emacs-package-install emacspeak
if command -v install-docs >/dev/null 2>&1; then
install-docs -i /usr/share/doc-base/emacspeak
fi
if [ "$1" = "configure" ]; then
if [ -d /usr/doc -a ! -e /usr/doc/emacspeak -a -d /usr/share/doc/emacspeak ]; then
ln -sf ../share/doc/emacspeak /usr/doc/emacspeak
fi
fi
|