#! /bin/sh # Automatically added by dh_installdeb/13.24.1 dpkg-maintscript-helper rm_conffile /etc/angband/pref/graf-mac.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/graf-win.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/graf-sdl.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/graf-gtk.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/graf-x11.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/pref-x11.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/pref-win.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/pref-gcu.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/pref-sdl.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/pref-mac.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/pref-acn.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/user-mac.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/font-gtk.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/pref/font-mac.prf 1:4.2.5\+dfsg-1\~ angband -- "$@" dpkg-maintscript-helper rm_conffile /etc/angband/edit/shop-own.txt 1:4.2.5\+dfsg-1\~ angband -- "$@" # End automatically added section set -e case "$1" in configure) # clean up old cruft if [ -d /var/lib/games/angband/save ]; then for file in $(find /var/lib/games/angband/save/ -type f); do if [ ! -f "$file" ]; then continue; fi base=$(basename "$file") if [ "X$base" = "Xdelete.me" ]; then continue; fi if [ -s "/var/games/angband/save/$base" ]; then mv -f "$file" "/var/games/angband/save/$base.old" else mv -f "$file" "/var/games/angband/save/$base" fi done fi if [ -d /var/lib/games/angband ]; then rm -rf /var/lib/games/angband fi # 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 chown root:games /usr/games/angband chmod 2755 /usr/games/angband chown root:games /var/games/angband/apex chmod 2775 /var/games/angband/apex chown root:games /var/games/angband/panic chmod 2775 /var/games/angband/panic chown root:games /var/games/angband/save chmod 2775 /var/games/angband/save chown root:games /var/games/angband/scores chmod 2775 /var/games/angband/scores ;; 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