fix preview send script

This commit is contained in:
Enno Rehling 2014-08-16 18:23:44 +02:00
parent 8803a9e9a8
commit d880de0b2a
1 changed files with 10 additions and 6 deletions

View File

@ -85,7 +85,7 @@ let turn=$turn+1
function send() { function send() {
echo "sending reports to $1" echo "sending reports to $1"
zip="$turn-$1.zip" zip="$turn-$1.zip"
zip -q -u $yip $turn-$1.?r zip -q -u $zip $turn-$1.?r
email=$(grep "faction=$1:" reports.txt | cut -d: -f2 | sed 's/email=//') email=$(grep "faction=$1:" reports.txt | cut -d: -f2 | sed 's/email=//')
cat /dev/null | mutt -F $ERESSEA/etc/muttrc -s "Testauswertung Spiel $GAME Partei $1" -a $zip -- $email cat /dev/null | mutt -F $ERESSEA/etc/muttrc -s "Testauswertung Spiel $GAME Partei $1" -a $zip -- $email
} }
@ -142,14 +142,18 @@ case "$1" in
;; ;;
"send") "send")
shift shift
sent=0
cd $TESTROOT/reports
for faction in $* ; do for faction in $* ; do
send $faction send $faction
sent=1
done done
cd $TESTROOT if [ $sent -eq 0 ]; then
if [ -e $factions ]; then if [ -e $factions ]; then
for faction in $(cat $factions) ; do for faction in $(cat $factions) ; do
send $faction send $faction
done done
fi
fi fi
break break
;; ;;