2012-02-25 11:11:48 -05:00
|
|
|
|
#!/bin/sh
|
2016-02-24 20:50:11 -05:00
|
|
|
|
# Post-remove script for ‘bsdgames’ package.
|
|
|
|
|
#
|
|
|
|
|
# Man page: ‘dh_installdeb(1)’
|
2012-02-25 11:11:48 -05:00
|
|
|
|
|
|
|
|
|
set -e
|
2010-01-15 17:31:41 -05:00
|
|
|
|
|
2016-02-24 20:50:11 -05:00
|
|
|
|
# Summary of ways this script can be called:
|
|
|
|
|
# * <postrm> ‘remove’
|
|
|
|
|
# * <postrm> ‘purge’
|
|
|
|
|
# * <old-postrm> ‘upgrade’ <new-version>
|
|
|
|
|
# * <disappearer's-postrm> ‘disappear’ <overwriter> <overwriter-version>
|
|
|
|
|
# * <new-postrm> ‘failed-upgrade’ <old-version>
|
|
|
|
|
# * <new-postrm> ‘abort-install’
|
|
|
|
|
# * <new-postrm> ‘abort-install’ <old-version>
|
|
|
|
|
# * <new-postrm> ‘abort-upgrade’ <old-version>
|
|
|
|
|
# For details, see <URL:http://www.debian.org/doc/debian-policy/> or
|
|
|
|
|
# the ‘debian-policy’ package.
|
|
|
|
|
|
2016-02-24 22:12:35 -05:00
|
|
|
|
action="$1"
|
|
|
|
|
|
2010-01-15 17:31:41 -05:00
|
|
|
|
SCOREFILES="
|
|
|
|
|
/var/games/bsdgames/atc_score
|
|
|
|
|
/var/games/bsdgames/battlestar.log
|
|
|
|
|
/var/games/bsdgames/cfscores
|
|
|
|
|
/var/games/bsdgames/criblog
|
|
|
|
|
/var/games/bsdgames/robots_roll
|
|
|
|
|
/var/games/bsdgames/saillog
|
|
|
|
|
/var/games/bsdgames/snake.log
|
|
|
|
|
/var/games/bsdgames/snakerawscores
|
|
|
|
|
/var/games/bsdgames/tetris-bsd.scores
|
|
|
|
|
/var/games/bsdgames/phantasia/characs
|
|
|
|
|
/var/games/bsdgames/phantasia/gold
|
|
|
|
|
/var/games/bsdgames/phantasia/lastdead
|
|
|
|
|
/var/games/bsdgames/phantasia/mess
|
|
|
|
|
/var/games/bsdgames/phantasia/motd
|
|
|
|
|
/var/games/bsdgames/phantasia/scoreboard
|
|
|
|
|
/var/games/bsdgames/phantasia/void
|
|
|
|
|
/var/games/bsdgames/phantasia/monsters
|
|
|
|
|
/var/games/bsdgames/hack/perm
|
|
|
|
|
/var/games/bsdgames/hack/record"
|
|
|
|
|
|
|
|
|
|
# Remove high score files on purge.
|
|
|
|
|
if [ "$1" = "purge" ]; then
|
|
|
|
|
rm -f $SCOREFILES
|
|
|
|
|
rmdir /var/games/bsdgames/phantasia /var/games/bsdgames/sail \
|
|
|
|
|
/var/games/bsdgames /var/games 2>/dev/null || true
|
|
|
|
|
rm -f /var/games/bsdgames/hack/save/* 2>/dev/null || true
|
|
|
|
|
rmdir -p /var/games/bsdgames/hack/save 2>/dev/null || true
|
|
|
|
|
fi
|
|
|
|
|
|
2016-02-24 22:12:35 -05:00
|
|
|
|
case "$action" in
|
|
|
|
|
|
|
|
|
|
remove|purge|upgrade|disappear|failed-upgrade|abort-install|abort-upgrade)
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
*)
|
|
|
|
|
printf "postrm called with unknown action ‘%s’\n" "$action" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
2010-01-15 17:31:41 -05:00
|
|
|
|
#DEBHELPER#
|
2016-02-24 20:54:23 -05:00
|
|
|
|
|
|
|
|
|
exit 0
|