summaryrefslogtreecommitdiff
path: root/staging/glhack/glhack.install
diff options
context:
space:
mode:
Diffstat (limited to 'staging/glhack/glhack.install')
-rw-r--r--staging/glhack/glhack.install24
1 files changed, 24 insertions, 0 deletions
diff --git a/staging/glhack/glhack.install b/staging/glhack/glhack.install
new file mode 100644
index 000000000..78e1655bc
--- /dev/null
+++ b/staging/glhack/glhack.install
@@ -0,0 +1,24 @@
+post_install() {
+ touch var/games/glhack/{record,perm,logfile}
+ chown root:games var/games/glhack/{record,perm,logfile}
+ chmod 664 var/games/glhack/{record,perm,logfile}
+}
+
+pre_upgrade() {
+ install -d -m775 var/games/glhack
+ chown root:games var/games/glhack
+ [ -e usr/share/glhack/record ] && cp usr/share/glhack/record var/games/glhack
+ [ -e usr/share/glhack/perm ] && cp usr/share/glhack/perm var/games/glhack
+ [ -e usr/share/glhack/logfile ] && cp usr/share/glhack/logfile var/games/glhack
+ if [ -d usr/share/glhack/save ]; then
+ chmod g-s usr/share/glhack/save
+ mv usr/share/glhack/save var/games/glhack
+ else
+ install -d -m775 var/games/glhack/save
+ fi
+ chown root:games var/games/glhack/save
+}
+
+post_upgrade() {
+ post_install
+}