#!/bin/sh

# cron doesn't seem to like doing this iself...
. /etc/profile

# Path to trunk
MYDIR="/home/dmdirc/google"
# Path to scripts
SCRIPTDIR="/home/dmdirc/scripts"
# Path to ant binary
ANT="/usr/bin/ant"
# Path to svn binary
SVN="/usr/bin/svn"

#/bin/sh $MYDIR/oblong.sh "Reports" "Style Report Generation Started";
cd $MYDIR
$SVN update
$ANT clean
if [ "$1" = "--all" ]; then
	$ANT -k -buildfile $MYDIR/doreports.xml doallreports
elif [ "$1" = "--findbugs" ]; then
	$ANT -k -buildfile $MYDIR/style_build.xml findbugs
else
	$ANT -k -buildfile $MYDIR/doreports.xml domostreports
fi

# Run junit issue notifier
$SCRIPTDIR/junit-failures.php

# Oblong junit announcement
LINE=`cat junitreports/overview-summary.html | grep "%</td"`
PASSRATE=`expr "$LINE" : '.*<td>\(.*\)%</td>'`
if [ "${PASSRATE}" = "" ]; then
	/bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit tests failed to run)"
else
	/bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit Pass Rate: ${PASSRATE}%)"
fi

#!/bin/sh

# cron doesn't seem to like doing this iself...
. /etc/profile

# Path to trunk
MYDIR="/home/dmdirc/google"
# Path to ant binary
ANT="/usr/bin/ant"
# Path to svn binary
SVN="/usr/bin/svn"

#/bin/sh $MYDIR/oblong.sh "Reports" "Style Report Generation Started";
cd $MYDIR
$SVN update
$ANT clean
if [ "$1" = "--all" ]; then
	$ANT -k -buildfile $MYDIR/doreports.xml doallreports
elif [ "$1" = "--findbugs" ]; then
	$ANT -k -buildfile $MYDIR/style_build.xml findbugs
else
	$ANT -k -buildfile $MYDIR/doreports.xml domostreports
fi

# Run junit issue notifier
$MYDIR/../scripts/junit-failures.php

# Oblong junit announcement
LINE=`cat junitreports/overview-summary.html | grep "%</td"`
PASSRATE=`expr "$LINE" : '.*<td>\(.*\)%</td>'`
if [ "${PASSRATE}" = "" ]; then
	/bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit tests failed to run)"
else
	/bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit Pass Rate: ${PASSRATE}%)"
fi

--- 
+++ 
@@ -5,8 +5,6 @@
 
 # Path to trunk
 MYDIR="/home/dmdirc/google"
-# Path to scripts
-SCRIPTDIR="/home/dmdirc/scripts"
 # Path to ant binary
 ANT="/usr/bin/ant"
 # Path to svn binary
@@ -25,7 +23,7 @@
 fi
 
 # Run junit issue notifier
-$SCRIPTDIR/junit-failures.php
+$MYDIR/../scripts/junit-failures.php
 
 # Oblong junit announcement
 LINE=`cat junitreports/overview-summary.html | grep "%</td"`
Work around error caused by stupid symlinking


git-svn-id: 50f83ef66c13f323b544ac924010c921a9f4a0f7@3139 00569f92-eb28-0410-84fd-f71c24880f43
