mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
35 lines
560 B
Text
35 lines
560 B
Text
|
scores=(
|
||
|
'gweled.easy.scores'
|
||
|
'gweled.timed.scores'
|
||
|
)
|
||
|
|
||
|
post_install() {
|
||
|
for score in "${scores[@]}" ; do
|
||
|
if [ -e "var/games/${score}" ]; then
|
||
|
continue
|
||
|
fi
|
||
|
if [ -e "opt/gnome/var/games/${score}" ]; then
|
||
|
mv "opt/gnome/var/games/${score}" var/games/
|
||
|
else
|
||
|
touch "var/games/${score}"
|
||
|
fi
|
||
|
chown root:games "var/games/${score}"
|
||
|
chmod 664 "var/games/${score}"
|
||
|
done
|
||
|
}
|
||
|
|
||
|
post_upgrade() {
|
||
|
post_install $1
|
||
|
}
|
||
|
|
||
|
post_remove() {
|
||
|
for score in "${scores[@]}" ; do
|
||
|
rm -f "var/games/$score"
|
||
|
done
|
||
|
}
|
||
|
|
||
|
op=$1
|
||
|
shift
|
||
|
|
||
|
$op $*
|