postinst is in ketm 0.0.6-22.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 | #! /bin/sh
set -e
DOCDIR="/usr/share/doc/ketm"
scores=/var/games/ketm.scores
# old versions of ketm (< 0.0.6-20) will remove high score file
# on upgrade, so rescue it
if $(dpkg --compare-versions "$2" lt-nl 0.0.6-20) ; then
[ -e $scores.tmp ] && mv $scores.tmp $scores
fi
# create high score file if not already there
if [ ! -e $scores ] ; then
touch $scores
chown games:games $scores
chmod 664 $scores
fi
chown root:games /usr/games/ketm
chmod 2755 /usr/games/ketm
if [ -d "$DOCDIR" -a ! -L "$DOCDIR" ]; then
rmdir --ignore-fail-on-non-empty "$DOCDIR"
if [ ! -d "$DOCDIR" ]; then
ln -s ketm-data "$DOCDIR"
fi
fi
# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
update-menus
fi
# End automatically added section
exit 0
|