#!/bin/sh

set -e

# Newer (post-0.6) versions of Typespeed use a single text-based
# file at $SCOREFILE.
# Create it and assign the correct permissions

SCOREFILE=/var/games/typespeed.score

if test "$1" = "configure"; then
	# Ensure new high score file exists and has proper permissions.

	if ! test -e $SCOREFILE; then
		touch $SCOREFILE
		chown root:games $SCOREFILE
		chmod 664 $SCOREFILE
	fi

	# Fix permissions
	chgrp games /usr/games/typespeed
	chmod g+s   /usr/games/typespeed

fi

#DEBHELPER#

