include weekly summary in the report email.

https://bugs.eressea.de/view.php?id=2135#c6115
This commit is contained in:
Enno Rehling 2015-09-07 11:04:56 +02:00
parent b33babd316
commit a28a35bb6c
5 changed files with 15 additions and 15 deletions

1
.gitignore vendored
View File

@ -41,3 +41,4 @@ Thumbs.db
*.cfg *.cfg
*.cmd *.cmd
tmp/ tmp/
tests/config.lua

View File

@ -1,6 +1,10 @@
#!/bin/bash #!/bin/bash
if [ -z $ERESSEA ]; then if [ -z $ERESSEA ]; then
echo "You have to define the \$ERESSEA environment variable to run $0" ERESSEA=`echo $PWD |sed -e 's/\/game.*//'`
echo "Assuming that ERESSEA=$ERESSEA"
fi
if [ ! -f reports.txt ]; then
echo "need to run $0 from the report direcory"
exit -2 exit -2
fi fi
source $HOME/bin/functions.sh source $HOME/bin/functions.sh
@ -19,17 +23,8 @@ then
shift shift
fi fi
EMAIL=$1 addr=$1
SUBJECT=$2 subj=$2
shift 2 shift 2
ATTACHMENTS="" cat $ERESSEA/etc/$TEMPLATE | mutt -F $ERESSEA/etc/muttrc -s "$subj" -a $* -- $addr
while [ $# -gt 0 ]
do
if [ -e "$1" ]; then
ATTACHMENTS="-a $1 $ATTACHMENTS"
fi
shift
done
cat $ERESSEA/etc/$TEMPLATE | mutt -F $ERESSEA/etc/muttrc -s "$SUBJECT" $ATTACHMENTS -- $EMAIL

View File

@ -39,7 +39,10 @@ while [ -e /tmp/.stopped ] ; do
echo "waiting 2 minutes for lockfile in /tmp/.stopped to clear" echo "waiting 2 minutes for lockfile in /tmp/.stopped to clear"
sleep 120 sleep 120
done done
mutt -F $ERESSEA/etc/muttrc -s "$2" -a "$3" -- $1 < $TEMPLATE addr=$1
subject=$2
shift 2
mutt -F $ERESSEA/etc/muttrc -s "$subject" -a $* -- $addr < $TEMPLATE
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo "Sending failed for email/report: $2/$3" echo "Sending failed for email/report: $2/$3"

View File

@ -21,7 +21,7 @@ make install
[ -d $DEST/bin ] || mkdir -p $DEST/bin [ -d $DEST/bin ] || mkdir -p $DEST/bin
install -v $ROOT/process/cron/*.cron $DEST/bin/ install -v $ROOT/process/cron/*.cron $DEST/bin/
programs="create-orders backup-eressea run-turn" programs="create-orders backup-eressea run-turn send-zip-report send-bz2-report"
for prg in ${programs} ; do for prg in ${programs} ; do
install -v $ROOT/process/$prg $DEST/bin/ install -v $ROOT/process/$prg $DEST/bin/
done done

View File

@ -19,5 +19,6 @@ cd $ROOT
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests.lua $ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests.lua
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e2.lua $ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e2.lua
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e3.lua $ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e3.lua
rm -rf data reports orders.txt
cd $OLDWPD cd $OLDWPD