Autobook: Simple framework for automated opening book building
[pachi/t.git] / tools / autobook / autobook.sh
blobbacbc70a94eca01938a0bcba0cbad55f9c3771ea
1 #!/bin/sh
3 if [ $# -ne 3 ]; then
4 echo "Usage: $0 PLAYER1 PLAYER2 BOOKDIR" >&2
5 exit 1
6 fi
8 export CMDDIR=$(pwd)
9 export SEQDIR=$(mktemp -d)
11 if [ ! -d "$3" ]; then
12 mkdir "$3"
13 { echo 8; echo 16; } >"$3"/stats
16 while true; do
17 (cd "$3"; "$CMDDIR"/walk.sh "$1" "$2")
18 sleep 5
19 done