#! /bin/sh set -e #export DEBCONF_DEBUG=developer # Source debconf library. . /usr/share/debconf/confmodule if [ "$1" = configure ] then # (Re)move old scorefile and directory if it exists if [ -e /var/lib/games/moon-buggy/mbscore ] then # If mbscore.old already exists in the new location, rename that one to # very_old, do not care about other very_old files (they should not even be # here!) if [ -e /var/games/moon-buggy/mbscore.old ] then mv /var/games/moon-buggy/mbscore.old /var/games/moon-buggy/mbscore.very_old fi # save the old score file as mbscore.old in the new scorefile location mv /var/lib/games/moon-buggy/mbscore /var/games/moon-buggy/mbscore.old # remove other files at old scorefile location, nothing else should be here # anyway rm -rf /var/lib/games/moon-buggy fi # some people think moon-buggy should not even try to delete this directory. # complain to them if your harddisk fills with cruft directories from FHS # changes ## remove leftover directories # if [ -d /var/lib/games ] # then ## also delete /var/lib/games if no other files are present # rmdir /var/lib/games # fi # make sure the score file is owned by root.games if [ -d /var/games/moon-buggy ] then /usr/games/moon-buggy -c chown root:games /var/games/moon-buggy/mbscore chmod 664 /var/games/moon-buggy/mbscore # this directory better exists... its part of the package else echo "The directory for the score files does not exist? Please file a bug." exit 1; fi fi #DEBHELPER#