2014-04-27 03:03:14 +02:00
|
|
|
#!/bin/bash
|
|
|
|
if [ -z $ERESSEA ]; then
|
2015-09-07 11:04:56 +02:00
|
|
|
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"
|
2014-04-27 03:03:14 +02:00
|
|
|
exit -2
|
|
|
|
fi
|
|
|
|
source $HOME/bin/functions.sh
|
|
|
|
source $ERESSEA/etc/eressea.conf
|
|
|
|
|
|
|
|
TEMPLATE=report-mail.txt
|
|
|
|
if [ "$1" == "-Lde" ]
|
|
|
|
then
|
|
|
|
TEMPLATE=report-mail.de.txt
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" == "-Lde" ]
|
|
|
|
then
|
|
|
|
TEMPLATE=report-mail.en.txt
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
2015-09-07 11:04:56 +02:00
|
|
|
addr=$1
|
|
|
|
subj=$2
|
2014-04-27 03:03:14 +02:00
|
|
|
shift 2
|
|
|
|
|
2015-09-07 11:04:56 +02:00
|
|
|
cat $ERESSEA/etc/$TEMPLATE | mutt -F $ERESSEA/etc/muttrc -s "$subj" -a $* -- $addr
|