File: postinst

package info (click to toggle)
groundhog 1.1-8
  • links: PTS
  • area: main
  • in suites: potato
  • size: 320 kB
  • ctags: 327
  • sloc: cpp: 1,816; makefile: 106; sh: 18
file content (18 lines) | stat: -rw-r--r-- 401 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
set -e

SCOREFILE="/var/games/groundhog/highscore"
OLDSCOREFILE="/var/lib/games/groundhog/highscore"

if [ "$1" = "configure" ]; then
    if [ -e $OLDSCOREFILE -a ! -e $SCOREFILE ]; then
	mv $OLDSCOREFILE $SCOREFILE
	rmdir /var/lib/games/groundhog /var/lib/games 2>/dev/null || true
    fi
fi

touch            $SCOREFILE
chown root.games $SCOREFILE
chmod 664        $SCOREFILE

#DEBHELPER#