File: postinst

package info (click to toggle)
spellcast 1.0-22
  • links: PTS
  • area: non-free
  • in suites: bookworm, bullseye, buster, sid, stretch
  • size: 728 kB
  • ctags: 834
  • sloc: ansic: 7,660; makefile: 94; sh: 11
file content (20 lines) | stat: -rw-r--r-- 573 bytes parent folder | download
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
		mkdir /var/games/spellcast
	fi
	# Are there any files here?
	if [ ! -z "`ls /var/lib/games/spellcast/*`" ] ; then
		mv /var/lib/games/spellcast/* /var/games/spellcast 
	fi
	rmdir /var/lib/games/spellcast
	chown -R games:games /var/games/spellcast
	chmod 0755 /var/games/spellcast
fi


#DEBHELPER#