#!/bin/sh
set -e
if test -e /etc/suid.conf -a -x /usr/sbin/suidregister; then
    suidregister -s maelstrom /usr/games/Maelstrom root games 6755
else
    chown root.games /usr/games/Maelstrom
    chmod 6755 /usr/games/Maelstrom
fi
if test -x /usr/bin/update-menus; then
    update-menus
fi
SCOREDIR=/var/lib/games/maelstrom
if ! test -e ${SCOREDIR}; then
    install -d ${SCOREDIR}
    chown root:games ${SCOREDIR}
    chmod 2775 ${SCOREDIR}
fi
if ! test -e ${SCOREDIR}/Maelstrom-Scores; then
    install -p -m 664 -g games \
       /usr/lib/games/maelstrom/Maelstrom-Scores.high \
       ${SCOREDIR}/Maelstrom-Scores
fi
