2015-09-10 16:01:29 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -z $ERESSEA ]; then
|
|
|
|
echo "You need to define the \$ERESSEA environment variable to run $0"
|
|
|
|
exit -2
|
|
|
|
fi
|
|
|
|
|
|
|
|
GAME=$ERESSEA/game-$1
|
2017-01-29 12:59:09 +01:00
|
|
|
GAME_NAME=$(grep -w name $GAME/eressea.ini | sed 's/.*=\s*//')
|
2015-09-10 16:01:29 +02:00
|
|
|
|
|
|
|
TURN=$2
|
|
|
|
if [ -z $TURN ]
|
|
|
|
then
|
|
|
|
TURN=`cat $GAME/turn`
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d $GAME/reports ]; then
|
|
|
|
echo "cannot find reports directory in $GAME"
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $GAME/reports
|
2017-01-25 21:26:30 +01:00
|
|
|
$ERESSEA/server/bin/compress.py $TURN "$GAME_NAME"
|
2015-09-10 16:01:29 +02:00
|
|
|
cd -
|