#!/bin/sh
# Start xboard with a game against zoe
# James Stanley 2011

# truncate zoe.out
cat /dev/null > zoe.out

# follow the output of zoe
tail -f zoe.out &

# kill tail when ^C is typed
SIGINT=2
trap "kill $!; echo; exit" $SIGINT

# run xboard
xboard -fcp ./zoelog "$@"

# kill the backgrounded tail
kill $!
