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
|
#!/bin/sh
set -e
# The old nighthawk 1.0 packages used this non-FHS location
OLD_SCORES=/var/lib/games/nighthawk.scores
SCORES=/var/games/nighthawk.scores
if [ ! -e ${SCORES%/*} ]; then
mkdir ${SCORES%/*}
fi
# Move the old scores to the new location.
# Don't leave an empty and useless directory behind.
if [ -e $OLD_SCORES ]; then
mv $OLD_SCORES $SCORES
rmdir --ignore-fail-on-non-empty ${OLD_SCORES%/*}
fi
if [ ! -e $SCORES ]; then
touch $SCORES
chown root:games $SCORES
chmod 0664 $SCORES
fi
#DEBHELPER#
|