diff options
author | Bryan Jurish <mukau@users.sourceforge.net> | 2009-02-15 12:20:48 +0000 |
---|---|---|
committer | Bryan Jurish <mukau@users.sourceforge.net> | 2009-02-15 12:20:48 +0000 |
commit | c9ad45306352cb29d341409fa7123a6ae62cb57f (patch) | |
tree | 66f49b3113d79fbe6a3764b6f93b7b0d0c65b242 /extended/checklogs.sh | |
parent | 4630d331bf9eb80e0f1c09cecfb9a0698b188a30 (diff) |
+ added auto-build log-parsing utilities
svn path=/trunk/externals/moocow/; revision=10778
Diffstat (limited to 'extended/checklogs.sh')
-rwxr-xr-x | extended/checklogs.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/extended/checklogs.sh b/extended/checklogs.sh new file mode 100755 index 0000000..ebd0429 --- /dev/null +++ b/extended/checklogs.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +## Usage: getlogs.sh [DATE [FORCE]] + +proto="http" +baseurl="autobuild.pure-data.info/auto-build" + +#wget_quiet_flags="-q" +#wget_quiet_flags="-nv" +wget_quiet_flags="" + +logdate="$1" +test $# -gt 0 && shift +test -z "$logdate" -o "$logdate" = "-" && logdate=`date +%Y-%m-%d` + +if [ $# -gt 0 ]; then + force="$1" + shift; +fi + +##-- get full log url +logdir="${baseurl}/${logdate}/logs" +logurl="${proto}://${logdir}" + +##-- get logs +if [ -d "$logdir" -a "$force" != "force" ]; then + echo "$0: logdir $logdir exists and 'force' was not specified" + echo "$0: NOT retrieving logs from $logurl" +else + echo "$0: retrieving logs from $logurl to $logdir" + wget $wget_quiet_flags -r -np -A ".html,_pd-extended_run-automated-builder.txt" "$logurl/" +fi + +##-- parse logs +for logfile in ${logdir}/*_pd-extended_*.txt; do + #echo "$0: parsing logfile $logfile" + ./parselog.perl "$logfile" > "$logfile.moo" +done |