diff options
author | linimon <linimon@FreeBSD.org> | 2010-05-20 12:04:24 +0800 |
---|---|---|
committer | linimon <linimon@FreeBSD.org> | 2010-05-20 12:04:24 +0800 |
commit | db9d64851e23d463dcc0d2e97ce98d8a7e842ef0 (patch) | |
tree | a08d4516a31f260afeee18774686b0060903d8cd /Tools | |
parent | 5bffdf3b6d3dfd4ed51f7537d6886ae74f6b1747 (diff) | |
download | freebsd-ports-gnome-db9d64851e23d463dcc0d2e97ce98d8a7e842ef0.tar.gz freebsd-ports-gnome-db9d64851e23d463dcc0d2e97ce98d8a7e842ef0.tar.zst freebsd-ports-gnome-db9d64851e23d463dcc0d2e97ce98d8a7e842ef0.zip |
Refactor things a bit.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/dopackagestats | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Tools/portbuild/scripts/dopackagestats b/Tools/portbuild/scripts/dopackagestats index 3baac4a41084..bc0eab6c3b4c 100755 --- a/Tools/portbuild/scripts/dopackagestats +++ b/Tools/portbuild/scripts/dopackagestats @@ -55,8 +55,9 @@ write_row () { arch=$1 build=$2 - # MCL 20080916 directory=${ROOT_DIRECTORY}/${arch}/${build}/builds/latest + # XXX MCL I hate this name + journal=${directory}/make branch=`echo $build | sed -e "s/-exp//"` if [ "$branch" = "4" ]; then @@ -196,9 +197,9 @@ write_row () { # queue length -PAV- m_not_yet_built="" queue_length="" - if [ "$completed_flag" = "N" ]; then - m_not_yet_built=`tail -n 1000 /var/portbuild/$arch/$build/builds/latest/make|grep MASTER|grep Queue|tail -1|sed 's|.*remaining=|| ; s|, Queue.*||'` - queue_length=`tail -n 1000 /var/portbuild/$arch/$build/builds/latest/make|grep MASTER|grep Queue|tail -1|sed 's|.*length=||'` + if [ "$completed_flag" = "N" -a -f $journal ]; then + m_not_yet_built=`tail -n 1000 $journal | grep MASTER | grep Queue | tail -1 | sed 's@.*remaining=@@ ; s@, Queue.*@@'` + queue_length=`tail -n 1000 $journal | grep MASTER | grep Queue | tail -1 | sed 's@.*length=@@'` fi; # now write the row |