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 $*