| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
# This maintainer script can be called the following ways: |
| 6 |
# |
| 7 |
# * new-postinst "configure" [$most_recently_configured_version] |
| 8 |
# The package is unpacked; all dependencies are unpacked and, when there |
| 9 |
# are no circular dependencies, configured. |
| 10 |
# |
| 11 |
# * old-postinst "abort-upgrade" $new_version |
| 12 |
# * old-postinst "abort-remove" |
| 13 |
# * conflictors-postinst "abort-remove" "in-favour" $new_package |
| 14 |
# $new_version |
| 15 |
# * deconfigureds-postinst "abort-deconfigure" "in-favour" |
| 16 |
# $failed_install_package $fip_version # new-package |
| 17 |
# ["removing" $conflicting_package $cp_version] # old-package |
| 18 |
# The package is unpacked; all dependencies are at least Half-Installed, |
| 19 |
# previously been configured, and not removed. In some error situations, |
| 20 |
# dependencies may not be even fully unpacked. |
| 21 |
# |
| 22 |
# * postinst "triggered" "${triggers[*]}" |
| 23 |
# For trigger-only calls, i.e. if "configure" is not called. |
| 24 |
# |
| 25 |
# * new-postinst "reconfigure" [$most_recently_configured_version](?) |
| 26 |
# Treat this as just like "configure" for a future extension by debconf. |
| 27 |
|
| 28 |
case $1 in |
| 29 |
(configure|reconfigure) |
| 30 |
for whatall in jstar:98 joe:97 jpico:96 jmacs:95; do |
| 31 |
whateditor=${whatall%:*} |
| 32 |
whatlevel=${whatall##*:} |
| 33 |
update-alternatives --install /usr/bin/editor editor \ |
| 34 |
/usr/bin/${whateditor} $whatlevel \ |
| 35 |
--slave /var/lib/misc/editorrc editorrc /etc/jupp/${whateditor}rc \ |
| 36 |
--slave /usr/share/man/man1/editor.1.gz editor.1.gz \ |
| 37 |
/usr/share/man/man1/${whateditor}.1.gz |
| 38 |
done |
| 39 |
update-alternatives --install /usr/bin/pico pico \ |
| 40 |
/usr/bin/jpico 2 \ |
| 41 |
--slave /usr/share/man/man1/pico.1.gz pico.1.gz \ |
| 42 |
/usr/share/man/man1/jpico.1.gz |
| 43 |
;; |
| 44 |
|
| 45 |
(abort-upgrade|abort-remove|abort-deconfigure) |
| 46 |
;; |
| 47 |
|
| 48 |
(triggered) |
| 49 |
;; |
| 50 |
|
| 51 |
(*) |
| 52 |
echo >&2 "E: postinst called with unknown subcommand '$1'" |
| 53 |
exit 1 |
| 54 |
;; |
| 55 |
esac |
| 56 |
|
| 57 |
# dh_installdeb will replace this with shell code automatically |
| 58 |
# generated by other debhelper scripts. |
| 59 |
|
| 60 |
#DEBHELPER# |
| 61 |
|
| 62 |
exit 0 |