postinst is in moon-buggy 1.0.51-9.
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #! /bin/sh -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
# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
update-menus
fi
# End automatically added section
|