From d1d93fafb9ef98fdd0c9a5a486c179c03cbbfb33 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 23 Apr 2013 01:16:16 -0700 Subject: Tue Apr 23 01:16:16 PDT 2013 --- extra/gnome-robots/gnome-robots.install | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 extra/gnome-robots/gnome-robots.install (limited to 'extra/gnome-robots/gnome-robots.install') 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 +} -- cgit v1.2.3-54-g00ecf