forked from github/server
bf86b1d66a
add an integration test for run-turn.lua
22 lines
442 B
Bash
Executable file
22 lines
442 B
Bash
Executable file
GAME=$1
|
|
TURN=$2
|
|
|
|
if [ ! -d $ERESSEA/game-$GAME ] ; then
|
|
echo "No such game: $GAME"
|
|
exit 1
|
|
fi
|
|
|
|
cd $ERESSEA/game-$GAME
|
|
if [ -z $TURN ]; then
|
|
TURN=$(cat turn)
|
|
fi
|
|
|
|
echo "running turn $TURN, game $GAME"
|
|
if [ -d orders.dir.$TURN ]; then
|
|
echo "orders.dir.$TURN already exists"
|
|
else
|
|
mv orders.dir orders.dir.$TURN
|
|
mkdir -p orders.dir
|
|
fi
|
|
ls -1rt orders.dir.$TURN/turn-* | xargs cat > orders.$TURN
|
|
$ERESSEA/bin/eressea -t $TURN run-turn.lua
|