#!/bin/bash LOG=${1} if [ "xx${PARSELOG_ALWAYS}xx"=!"xxyxx" ]; then if [ -f ${LOG}.parsed ]; then cat ${LOG}.parsed exit 0 fi fi { #BUILD_FAIL=`grep '\[BUILD FAILED\]' ${LOG} | wc -l` NUM_FAIL=`grep '\[.* FAILED\]' ${LOG} | wc -l` NUM_OK=`grep '\[TEST SUCCESSFUL\]' ${LOG} | wc -l` REVISION=`awk '/^Revision:/ { print $2; exit}' $LOG` REPO=`awk '/^Repo:/ { print $2; exit}' $LOG` if [ -f ${LOG}.lock ]; then BUILD_STATUS="build in progress..." elif (($NUM_FAIL==0)); then BUILD_STATUS="OK" else BUILD_STATUS="broken!" fi echo "