diff options
Diffstat (limited to 'extra/five-or-more/five-or-more.install')
-rw-r--r-- | extra/five-or-more/five-or-more.install | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/extra/five-or-more/five-or-more.install b/extra/five-or-more/five-or-more.install new file mode 100644 index 000000000..eb9e34de3 --- /dev/null +++ b/extra/five-or-more/five-or-more.install @@ -0,0 +1,35 @@ +_scores=( + glines.Small.scores + glines.Medium.scores + glines.Large.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 +} |