| 1 |
#! /bin/sh
|
| 2 |
|
| 3 |
# Copyright 2001,2,3,8 Martin Schulze <joey@debian.org>
|
| 4 |
# Copyright 2011 David Prévot <david@tilapin.org>
|
| 5 |
#
|
| 6 |
# This program is free software; you can redistribute it and/or modify
|
| 7 |
# it under the terms of the GNU General Public License as published by
|
| 8 |
# the Free Software Foundation; either version 2 of the License, or
|
| 9 |
# (at your option) any later version.
|
| 10 |
#
|
| 11 |
# This program is distributed in the hope that it will be useful,
|
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
# GNU General Public License for more details.
|
| 15 |
#
|
| 16 |
# You should have received a copy of the GNU General Public License
|
| 17 |
# along with this program; if not, write to the Free Software
|
| 18 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 19 |
|
| 20 |
from='Debian Webmaster <webmaster@debian.org>'
|
| 21 |
xloop=debian-www@lists.debian.org
|
| 22 |
dirout=/srv/www-master.debian.org/htdocs/build-logs/validate/
|
| 23 |
dirtidy=/srv/www-master.debian.org/htdocs/build-logs/tidy/
|
| 24 |
|
| 25 |
. `dirname $0`/../common.sh
|
| 26 |
|
| 27 |
confile=${webtopdir}/webwml/english/devel/website/validation.data
|
| 28 |
|
| 29 |
for file in $dirout*; do
|
| 30 |
if [ -s $file ]; then
|
| 31 |
(
|
| 32 |
|
| 33 |
echo "From: $from"
|
| 34 |
echo "To:" `grep "^${file#$dirout} " $confile | sed "s/^${file#$dirout} //"`
|
| 35 |
echo "X-Loop: $xloop"
|
| 36 |
echo "Subject: Validation failed"
|
| 37 |
echo
|
| 38 |
cat $file
|
| 39 |
echo
|
| 40 |
echo "--"
|
| 41 |
echo " You received this mail for the language code ${file#$dirout}."
|
| 42 |
echo " Please edit webwml/english/devel/website/validation.data if this is not accurate"
|
| 43 |
echo " Please also update webwml/english/devel/website/ with the new coordinator(s) data"
|
| 44 |
|
| 45 |
) | /usr/sbin/sendmail -t
|
| 46 |
elif [ -s ${dirtidy}${file#$dirout} ]; then
|
| 47 |
(
|
| 48 |
|
| 49 |
echo "From: $from"
|
| 50 |
echo "To:" `grep "^${file#$dirout} " $confile | sed "s/^${file#$dirout} //"`
|
| 51 |
echo "X-Loop: $xloop"
|
| 52 |
echo "Subject: Tidy validation failed"
|
| 53 |
echo
|
| 54 |
cat ${dirtidy}${file#$dirout}
|
| 55 |
echo
|
| 56 |
echo "--"
|
| 57 |
echo " You received this mail for the language code ${file#$dirout}."
|
| 58 |
echo " Please edit webwml/english/devel/website/validation.data if this is not accurate."
|
| 59 |
echo " Please also update webwml/english/devel/website/ with the new coordinator(s) data."
|
| 60 |
|
| 61 |
) | /usr/sbin/sendmail -t
|
| 62 |
fi
|
| 63 |
done
|
| 64 |
|
| 65 |
# Send a weekly mail to en listed team
|
| 66 |
if [ `date +%u` -eq 1 ]; then
|
| 67 |
for file in $dirout*; do
|
| 68 |
if [ -s $file ]; then
|
| 69 |
(
|
| 70 |
|
| 71 |
echo "From: $from"
|
| 72 |
echo "To:" `grep "^en " $confile | sed "s/^$en //"`
|
| 73 |
echo "X-Loop: $xloop"
|
| 74 |
echo "Subject: Validation failed"
|
| 75 |
echo
|
| 76 |
cat $file
|
| 77 |
echo
|
| 78 |
echo "--"
|
| 79 |
echo " You received this mail for the language code ${file#$dirout}"
|
| 80 |
echo " because you are listed for the language code en, lucky you!"
|
| 81 |
|
| 82 |
) | /usr/sbin/sendmail -t
|
| 83 |
elif [ -s ${dirtidy}${file#$dirout} ]; then
|
| 84 |
(
|
| 85 |
|
| 86 |
echo "From: $from"
|
| 87 |
echo "To:" `grep "^en " $confile | sed "s/^$en //"`
|
| 88 |
echo "X-Loop: $xloop"
|
| 89 |
echo "Subject: Tidy validation failed"
|
| 90 |
echo
|
| 91 |
cat ${dirtidy}${file#$dirout}
|
| 92 |
echo
|
| 93 |
echo "--"
|
| 94 |
echo " You received this mail for the language code ${file#$dirout}"
|
| 95 |
echo " because you are listed for the language code en, lucky you!"
|
| 96 |
|
| 97 |
) | /usr/sbin/sendmail -t
|
| 98 |
fi
|
| 99 |
done
|
| 100 |
fi
|