summaryrefslogtreecommitdiff
path: root/extra/gnome-robots/gnome-robots.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/gnome-robots/gnome-robots.install')
-rw-r--r--extra/gnome-robots/gnome-robots.install47
1 files changed, 47 insertions, 0 deletions
diff --git a/extra/gnome-robots/gnome-robots.install b/extra/gnome-robots/gnome-robots.install
new file mode 100644
index 000000000..3422e0c8a
--- /dev/null
+++ b/extra/gnome-robots/gnome-robots.install
@@ -0,0 +1,47 @@
+_scores=(
+ gnome-robots2.robots2.scores
+ gnome-robots2.robots2-safe.scores
+ gnome-robots2.robots2-super-safe.scores
+ gnome-robots2.robots2_easy.scores
+ gnome-robots2.robots2_easy-safe.scores
+ gnome-robots2.robots2_easy-super-safe.scores
+ gnome-robots2.classic_robots.scores
+ gnome-robots2.classic_robots-safe.scores
+ gnome-robots2.classic_robots-super-safe.scores
+ gnome-robots2.robots_with_safe_teleport.scores
+ gnome-robots2.robots_with_safe_teleport-safe.scores
+ gnome-robots2.robots_with_safe_teleport-super-safe.scores
+ gnome-robots2.nightmare.scores
+ gnome-robots2.nightmare-safe.scores
+ gnome-robots2.nightmare-super-safe.scores
+)
+
+post_install() {
+ glib-compile-schemas usr/share/glib-2.0/schemas
+ update-desktop-database -q
+ gtk-update-icon-cache -q -f usr/share/icons/hicolor
+
+ for score in "${_scores[@]}" ; do
+ if [ -e "var/games/$score" ]; then
+ continue
+ fi
+
+ touch "var/games/$score"
+ chown root:games "var/games/$score"
+ chmod 664 "var/games/$score"
+ done
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ glib-compile-schemas usr/share/glib-2.0/schemas
+ update-desktop-database -q
+ gtk-update-icon-cache -q -f usr/share/icons/hicolor
+
+ for score in "${_scores[@]}" ; do
+ rm -f "var/games/$score"
+ done
+}