File: postinst

package info (click to toggle)
xbomb 2.1a-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 168 kB
  • ctags: 139
  • sloc: ansic: 1,200; makefile: 81; sh: 16
file content (26 lines) | stat: -rw-r--r-- 605 bytes parent folder | download | duplicates (3)
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

#DEBHELPER#

# none of the following checks script arguments because it's all
# harmless and can be done repeatedly without danger.

# 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