postinst is in xbomb 2.2a-2.
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 | #!/bin/sh
set -e
# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
update-menus
fi
# End automatically added section
# none of the following checks script arguments because it's all
# harmless and can be done repeatedly without danger.
# create the new high-scores directory if needed
mkdir -p /var/games/xbomb
# clean up any existing files in the old location, /var/lib/games
if [ -d /var/lib/games/xbomb ]; then
mv /var/lib/games/xbomb/* /var/games/xbomb || true
rm -rf /var/lib/games/xbomb || true
fi
# Create empty hi-score files if needed
cd /var/games/xbomb/
for i in xbomb6.hi xbomb4.hi xbomb3.hi; do
if [ ! -e $i ]; then
touch $i
chown root:games $i
fi
# Set permissions (fixes permissions of pre 2.0-3 files)
chmod 664 $i
done
|