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
|
#!/bin/sh
#
# Blackbox postinst
#
# Shamelessly ripped off of Marcelo Magallon's script
# by Brent Fulgham <bfulgham@debian.org>
#
set -e
inst=/etc/menu-methods/blackbox
WMentry="/usr/bin/blackbox"
script='print "'$WMentry'\n" unless (/^#(?!--)/ || $done) ; $done=1 unless /^#(?!--)/'
add_wm_entry ()
{
update-alternatives --install /usr/bin/x-window-manager x-window-manager $WMentry 50 \
--slave /usr/share/man/man1/x-window-manager.1.gz x-window-manager.1.gz /usr/share/man/man1/blackbox.1.gz
}
case "$1" in
configure)
if [ "$2" ] && dpkg --compare-versions $2 le 0.51.3-12; then
update-alternatives --remove x-window-manager /etc/X11/window-managers
fi
add_wm_entry
if test -x /usr/sbin/wm-menu-config; then
wm-menu-config blackbox on;
fi
if [ -f /etc/X11/blackbox/Blackbox-menu ]; then
rm /etc/X11/blackbox/Blackbox-menu
fi
update-bbstyles --build
;;
abort-upgrade|abort-deconfigure|abort-remove)
# how did we get here? Force a non-zero exit code
exit 1
;;
*)
echo "postinst called with unknown argument: \$1" >&2
;;
esac
#DEBHELPER#
|