File: postinst

package info (click to toggle)
spellcast 1.0-21
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k, jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 768 kB
  • ctags: 834
  • sloc: ansic: 7,660; makefile: 128; sh: 11
file content (20 lines) | stat: -rw-r--r-- 603 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

# Movement of /var/lib/games to /var/games as per policy...
# (dpkg should give a warning to users the first time...)
# Movement should only be made when  updating from <-8 to =>-8
if [ -d /var/lib/games/spellcast ]; then
	if [ ! -d /var/games/spellcast ] ; then
		/bin/mkdir /var/games/spellcast
	fi
	# Are there any files here?
	if [ ! -z "`/bin/ls /var/lib/games/spellcast/*`" ] ; then
		/bin/mv /var/lib/games/spellcast/* /var/games/spellcast 
	fi
	/bin/rmdir /var/lib/games/spellcast
	/bin/chown -R games.games /var/games/spellcast
	/bin/chmod 0755 /var/games/spellcast
fi


#DEBHELPER#