#!/bin/sh

chk=`whoami | grep root`
if [ "$chk.x" = ".x" ]; then
  echo "This command should be used by root or use sudo"
  exit
fi

# for bsd_games-2.17-x86_64-P3.txz

chgrp -R games /var/games/*
chmod -R g+rw /var/games/*

# others could be updated via updatepkg

for pkg in *txz ; do
    updatepkg -f $pkg
done
