script to generate xml for page to allow committer access to failed build's ant logs
diff --git a/buildFailureList.sh b/buildFailureList.sh
new file mode 100644
index 0000000..3fe0239
--- /dev/null
+++ b/buildFailureList.sh
@@ -0,0 +1,73 @@
+# !/bin/sh
+#set -x
+
+BaseDownloadURL="http://www.eclipse.org/downloads/download.php?file=/rt/eclipselink/recent-failure-logs"
+BaseDisplayURL="http://download.eclipse.org/rt/eclipselink/recent-failure-logs"
+BaseDownloadNFSDir="/home/data/httpd/download.eclipse.org/rt/eclipselink"
+buildir=/shared/rt/eclipselink
+cd ${buildir}
+
+echo "generating build-failure webpage..."
+
+# safe temp directory
+tmp=${TMPDIR-/tmp}
+tmp=$tmp/somedir.$RANDOM.$RANDOM.$RANDOM.$$
+(umask 077 && mkdir $tmp) || {
+ echo "Could not create temporary directory! Exiting." 1>&2
+ exit 1
+}
+
+curdir=`pwd`
+cd ${BaseDownloadNFSDir}/recent-failure-logs
+
+# Generate the "failed build" table
+# Dump out the table header html
+echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> " >> $tmp/index.xml
+echo "<sections title=\"Eclipse Persistence Services Project (EclipseLink) : Failed Builds logs\">" >> $tmp/index.xml
+echo " <description> " >> $tmp/index.xml
+echo " <p> Logs are stored for the last 10 failed builds, older logs are available on the build machine.</p>" >> $tmp/index.xml
+echo " </description> " >> $tmp/index.xml
+echo " <section class=\"main\" name=\"Failed Builds\"> " >> $tmp/index.xml
+echo " <description> " >> $tmp/index.xml
+
+ echo " <p> " >> $tmp/index.xml
+ echo " <table border=\"1\"> " >> $tmp/index.xml
+ echo " <tr> " >> $tmp/index.xml
+ echo " <th colspan=\"1\" align=\"center\"> Failed Build Logs </th> " >> $tmp/index.xml
+ echo " </tr> " >> $tmp/index.xml
+
+ echo " <tr>" >> $tmp/index.xml
+ echo " <td align=\"center\">" >> $tmp/index.xml
+
+for file in `ls | grep log | sort -t_ -k3 -r` ; do
+
+ # list all files in dir, reverse sort to put newer on top
+ # and look for the first matching filename to generate html link
+ if [ "${file}" != "" ] ; then
+ echo " <td align=\"center\"> ${file} <a href=\"${BaseDownloadURL}/bf/${file}\"> Download </a> <a href=\"${BaseDisplayURL}/bf/${file}\"> View </a> <br/>" >> $tmp/index.xml
+ else
+ echo " Ant log not available <br/>" >> $tmp/index.xml
+ fi
+
+ echo " </tr>" >> $tmp/index.xml
+
+done
+
+echo " </table> " >> $tmp/index.xml
+echo " </p> " >> $tmp/index.xml
+
+# Dump the static footer into place
+echo " <script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\"/>" >> $tmp/index.xml
+echo " <script type=\"text/javascript\"> " >> $tmp/index.xml
+echo " _uacct = \"UA-1608008-2\"; " >> $tmp/index.xml
+echo " urchinTracker(); " >> $tmp/index.xml
+echo " </script> " >> $tmp/index.xml
+echo " </description> " >> $tmp/index.xml
+echo " </section> " >> $tmp/index.xml
+echo "</sections> " >> $tmp/index.xml
+
+# Copy the completed file to the server, and cleanup
+mv -f $tmp/index.xml ${BaseDownloadNFSDir}/build-failures.xml
+rm -rf $tmp
+
+cd ${curdir}