#!/bin/bash

set -e

# Package mantianers, DO NOT use this as an example for how to
# call update-menus in your postinst! This script does several things
# you shouldn't do, and doesn't do other things that you should
# do. See /usr/doc/menu/ for more info.

killall -KILL update-menus 2> /dev/null || true
chmod a+x /usr/bin/update-menus
update-menus 

install-info --quiet \
            --section "Information" "Information:" \
            --description="The Debian menu system" \
            /usr/info/menu.info


if [ "$1" = "configure" ]; then
    if [ -d /usr/doc -a ! -e /usr/doc/menu -a -d /usr/share/doc/menu ]; then
	ln -sf ../share/doc/menu /usr/doc/menu
    fi
fi
	