forked from github/server
include weekly summary in the report email.
https://bugs.eressea.de/view.php?id=2135#c6115
This commit is contained in:
parent
b33babd316
commit
a28a35bb6c
|
@ -41,3 +41,4 @@ Thumbs.db
|
||||||
*.cfg
|
*.cfg
|
||||||
*.cmd
|
*.cmd
|
||||||
tmp/
|
tmp/
|
||||||
|
tests/config.lua
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue