2014-04-27 03:03:14 +02:00
|
|
|
#!/bin/bash
|
2017-12-03 15:43:22 +01:00
|
|
|
if [ -z "$ERESSEA" ]; then
|
|
|
|
ERESSEA=$(echo "$PWD" |sed -e 's/\/game.*//')
|
2015-09-07 11:04:56 +02:00
|
|
|
echo "Assuming that ERESSEA=$ERESSEA"
|
|
|
|
fi
|
|
|
|
if [ ! -f reports.txt ]; then
|
|
|
|
echo "need to run $0 from the report direcory"
|
2019-07-31 08:43:23 +02:00
|
|
|
exit 2
|
2014-04-27 03:03:14 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
TEMPLATE=report-mail.txt
|
|
|
|
if [ "$1" == "-Lde" ]
|
|
|
|
then
|
|
|
|
TEMPLATE=report-mail.de.txt
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
2017-09-25 09:32:15 +02:00
|
|
|
if [ "$1" == "-Len" ]
|
2014-04-27 03:03:14 +02:00
|
|
|
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
|
|
|
|
|
2018-07-24 13:57:46 +02:00
|
|
|
mutt -s "$subj" -a "$@" -- "$addr" \
|
2017-12-03 15:43:22 +01:00
|
|
|
< "$ERESSEA/server/etc/$TEMPLATE"
|
|
|
|
|