summaryrefslogtreecommitdiff
path: root/extra/five-or-more/five-or-more.install
blob: eb9e34de36cc309907e27fadf07b8bf1bab6d723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
}