#! /bin/sh #DEBHELPER# set -e case "$1" in configure) # clean out old conf files which are now in /usr/share/angband if [ -d /etc/angband/help ]; then rm -rf /etc/angband/help fi if [ -d /etc/angband/file ]; then rm -rf /etc/angband/file fi # preserve the following from previous versions for manual cleanup: # - any pref files in /var/games/angband/user # - any spoiler files in /var/games/angband/info for dir in user info; do if [ -e /var/games/angband/$dir/delete.me ]; then rm -f /var/games/angband/$dir/delete.me fi if [ -d /var/games/angband/$dir ]; then rmdir --ignore-fail-on-non-empty /var/games/angband/$dir fi done for dir in bone data xtra; do if [ -d /var/games/angband/$dir ]; then rm -rf /var/games/angband/$dir fi done for link in edit file help pref; do if [ -L /var/games/angband/$link ]; then rm /var/games/angband/$link fi done # Set correct permissions for exe, score and save dirs # -> this is moved to d/angband.tmpfiles ;; abort-upgrade) # Back out of an attempt to upgrade this package FROM THIS VERSION # to version $2. Undo the effects of "prerm upgrade $2". : ;; abort-remove) if test "$2" != in-favour; then echo "$0: undocumented call to \`postinst $*'" 1>&2 exit 0 fi # Back out of an attempt to remove this package, which was due to # a conflict with package $3 (version $4). Undo the effects of # "prerm remove in-favour $3 $4". : ;; abort-deconfigure) if test "$2" != in-favour || test "$5" != removing; then echo "$0: undocumented call to \`postinst $*'" 1>&2 exit 0 fi # Back out of an attempt to deconfigure this package, which was # due to package $6 (version $7) which we depend on being removed # to make way for package $3 (version $4). Undo the effects of # "prerm deconfigure in-favour $3 $4 removing $6 $7". : ;; *) echo "$0: didn't understand being called with \`$1'" 1>&2 exit 0;; esac