summarylogtreecommitdiffstats
path: root/pinball.install
diff options
context:
space:
mode:
authorJorge Barroso2015-06-15 21:30:33 +0200
committerJorge Barroso2015-06-15 21:30:33 +0200
commit571ecc60c1398b241c65b4a9086f96e8683f6915 (patch)
treef8205da52cd9e65decdfc8122590d16d90ef165d /pinball.install
downloadaur-571ecc60c1398b241c65b4a9086f96e8683f6915.tar.gz
Initial import
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
+ }