summarylogtreecommitdiffstats
path: root/pinball.install
diff options
context:
space:
mode:
Diffstat (limited to 'pinball.install')
-rw-r--r--pinball.install30
1 files changed, 30 insertions, 0 deletions
diff --git a/pinball.install b/pinball.install
new file mode 100644
index 00000000000..e39f87dae83
--- /dev/null
+++ b/pinball.install
@@ -0,0 +1,30 @@
+post_install() {
+ touch var/games/pinball/{professor,tux}/highscores
+ chown root:games var/games/pinball/{professor,tux}/highscores
+ chmod 664 var/games/pinball/{professor,tux}/highscores
+}
+
+pre_upgrade() {
+ chown root:games var/games/pinball/{professor,tux}
+ chmod 775 var/games/pinball/{professor,tux}
+ cp var/games/pinball/professor/highscores var/games/pinball/professor/highscores.bak.pre_upgrade
+ cp var/games/pinball/tux/highscores var/games/pinball/tux/highscores.bak.pre_upgrade
+}
+
+post_upgrade() {
+ if [ -e var/games/pinball/professor/highscores.bak.pre_upgrade ]; then
+ mv var/games/pinball/professor/highscores.bak.pre_upgrade var/games/pinball/professor/highscores
+ fi
+
+ if [ -e var/games/pinball/tux/highscores.bak.pre_upgrade ]; then
+ mv var/games/pinball/tux/highscores.bak.pre_upgrade var/games/pinball/tux/highscores
+ fi
+
+ touch var/games/pinball/professor/highscores
+ chown root:games var/games/pinball/professor/highscores
+ chmod 664 var/games/pinball/professor/highscores
+
+ touch var/games/pinball/tux/highscores
+ chown root:games var/games/pinball/tux/highscores
+ chmod 664 var/games/pinball/tux/highscores
+ }