#!/bin/sh

# $FreeBSD$

GAMESROOT=/var/games/emacs
ARCHLIBDIR=/usr/local/libexec/emacs/24.5/amd64-portbld-freebsd9.1

if [ "$2" = "POST-INSTALL" ]; then
    umask 022
    mkdir -p $GAMESROOT
    touch $GAMESROOT/snake-scores
    touch $GAMESROOT/tetris-scores
    chown games $ARCHLIBDIR/update-game-score
    chmod u+s $ARCHLIBDIR/update-game-score
    chown games $GAMESROOT
    chmod 775 $GAMESROOT
fi

exit 0
