From 2fe59a537a0a0321193642b9bbdefb2aea98d4b5 Mon Sep 17 00:00:00 2001 From: Mark Linimon Date: Fri, 25 Jun 2010 23:39:54 +0000 Subject: Generalize the packge building scripts to be able to be run on more than one 'head' node, rather than just pointyhat itself. Constants are factored out into installation-specific files known as portbuild/conf/server.conf and portbuild/conf/client.conf. There is only one server.conf file. Individual directories may have their own client.conf files, or may symlink to ../conf/client.conf. While here, do some refactoring. Feature safe: yes --- Tools/portbuild/scripts/stats | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Tools') diff --git a/Tools/portbuild/scripts/stats b/Tools/portbuild/scripts/stats index c4e7e92a15ac..3e84e5715647 100755 --- a/Tools/portbuild/scripts/stats +++ b/Tools/portbuild/scripts/stats @@ -1,6 +1,7 @@ #!/bin/sh -SUPPORTED_ARCHS="amd64 i386 ia64 sparc64" +pb=/var/portbuild +. ${pb}/conf/server.conf if [ $# -ne 1 ]; then echo "usage: " @@ -10,8 +11,9 @@ fi branch=$1 for i in ${SUPPORTED_ARCHS}; do - if [ -d /var/portbuild/$i/${branch}/builds/latest/packages/All ]; then - count=$(find /var/portbuild/$i/${branch}/builds/latest/packages/All -name \*.tbz -o -name \*.tgz |wc -l) + all=${pb}/$i/${branch}/builds/latest/packages/All + if [ -d ${all} ]; then + count=$(find ${all} -name \*.tbz -o -name \*.tgz |wc -l) echo -n "$i: ${count} " fi done -- cgit v1.2.3