server/process/send-bz2-report
2017-01-26 18:05:26 +01:00

29 lines
519 B
Bash
Executable file

#!/bin/bash
if [ -z $ERESSEA ]; then
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
fi
source $HOME/bin/functions.sh
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
addr=$1
subj=$2
shift 2
cat $ERESSEA/etc/$TEMPLATE | mutt -F $ERESSEA/etc/muttrc -s "$subj" -a $* -- $addr