2010-11-14 14:13:48 -01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-07-06 00:30:17 +00:00
|
|
|
export TOPDIR=$(dirname $0)
|
|
|
|
|
|
|
|
. $TOPDIR/settings.sh
|
|
|
|
. $TOPDIR/common.sh
|
|
|
|
|
2010-11-14 14:13:48 -01:00
|
|
|
OUTDIR=$1
|
|
|
|
ARCH=$2
|
|
|
|
RESULTS=$3
|
|
|
|
|
|
|
|
OUTFILE=$OUTDIR/$ARCH/HEADER.html
|
2012-07-06 00:30:17 +00:00
|
|
|
INLOGS="/org/cdbuilder.debian.org/dst/deb-cd/log"
|
|
|
|
OUTLOGS="build-logs/$DATE"
|
2010-11-14 14:13:48 -01:00
|
|
|
|
|
|
|
grep -q WARNING $OUTFILE
|
|
|
|
if [ $? -ne 0 ] ; then
|
|
|
|
echo >> $OUTFILE
|
|
|
|
echo "<p><strong>WARNING:</strong>" >> $OUTFILE
|
|
|
|
echo "This build is not up to date; it is the most recent successful build.</p>" >> $OUTFILE
|
|
|
|
echo >> $OUTFILE
|
|
|
|
echo "<p>Later weekly builds failed with errors:</p>" >> $OUTFILE
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "<hr>" >> $OUTFILE
|
|
|
|
echo "<ul>" >> $OUTFILE
|
2012-07-06 00:30:17 +00:00
|
|
|
mkdir -p ${OUTDIR}/${ARCH}/${OUTLOGS}
|
2010-11-14 14:13:48 -01:00
|
|
|
for RESULT in $RESULTS; do
|
|
|
|
TYPE=`echo $RESULT | awk -F / '{print $1}'`
|
|
|
|
ERROR=`echo $RESULT | awk -F / '{print $2}'`
|
|
|
|
DATE=`echo $RESULT | awk -F / '{print $3}'`
|
2012-07-06 00:30:17 +00:00
|
|
|
LOGFILE=`echo $RESULT | awk -F / '{print $4}'`
|
|
|
|
BUILDTYPE=`echo $TYPE | sed 's/FAIL//g'`
|
|
|
|
cp ${INLOGS}/${LOGFILE} ${OUTDIR}/${ARCH}/${OUTLOGS}/${BUILDTYPE}.log
|
|
|
|
DESC=`build_description ${BUILDTYPE}`
|
|
|
|
echo "<li>$DESC build failed with error $ERROR at $DATE; <a href=\"$OUTLOGS/${BUILDTYPE}.log\">logfile</a>" >> $OUTFILE
|
|
|
|
|
2010-11-14 14:13:48 -01:00
|
|
|
done
|
|
|
|
echo "</ul>" >> $OUTFILE
|
|
|
|
|