summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorMark Linimon <linimon@FreeBSD.org>2006-07-05 23:29:45 +0000
committerMark Linimon <linimon@FreeBSD.org>2006-07-05 23:29:45 +0000
commitc2c0a5bbad7a70dc50e798d248070b1648e1d546 (patch)
treeaabffe2652db95293a0b1236aba97154a827c9c9 /Tools
parentFix KDE Bug 128610 (kscreensaver does not launch screensaver after x minutes). (diff)
Refactor. No code changes yet.
Notes
Notes: svn path=/head/; revision=167022
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/dopackagestats32
1 files changed, 16 insertions, 16 deletions
diff --git a/Tools/portbuild/scripts/dopackagestats b/Tools/portbuild/scripts/dopackagestats
index 5a66000e5b84..81473c087dc2 100755
--- a/Tools/portbuild/scripts/dopackagestats
+++ b/Tools/portbuild/scripts/dopackagestats
@@ -40,6 +40,8 @@ for arch in ${SUPPORTED_ARCHS}; do
branches=`ls ${ROOT_DIRECTORY}/${arch} | grep '^[1-9]$' | sort`
for branch in ${branches}; do
+ # first, gather data
+
directory=${ROOT_DIRECTORY}/${arch}/${branch}
if [ "$branch" = "4" ]; then
indexfile=$directory/ports/INDEX
@@ -47,11 +49,6 @@ for arch in ${SUPPORTED_ARCHS}; do
indexfile=$directory/ports/INDEX-$branch
fi
- echo "<tr>" >> ${TMPFILE}
-
- # column: ARCH
- echo "<th align='left'>$arch-$branch</th>" >> ${TMPFILE}
-
# column: datestamp of latest log
latest="&nbsp;"
if [ -d $directory/logs ]; then
@@ -63,23 +60,18 @@ for arch in ${SUPPORTED_ARCHS}; do
latest="&nbsp;"
fi
fi
- echo "<td align='left'>$latest</td>" >> ${TMPFILE}
# column: INDEX count
n_index=0
if [ -f $indexfile ]; then
n_index=`cat $indexfile | wc -l`
fi
- echo "<td align='right'>$n_index</td>" >> ${TMPFILE}
# column: package count
n_packages=0
if [ -d $directory/packages/All ]; then
n_packages=`find $directory/packages/All -name \*.tbz -o -name \*.tgz |wc -l`
fi
- echo "<td align='right'>" >> ${TMPFILE}
- echo "<a href='http://pointyhat.freebsd.org/errorlogs/$arch-$branch-latest-logs'>" >> ${TMPFILE}
- echo "$n_packages</a></td>" >> ${TMPFILE}
# column: error count
n_errors=0
@@ -88,16 +80,12 @@ for arch in ${SUPPORTED_ARCHS}; do
#n_errors=`find $directory/errors -name \*.log -o -name \*.log.bz2 |wc -l`
n_errors=`ls $directory/errors | grep '.log' | wc -l`
fi
- echo "<td align='right'>" >> ${TMPFILE}
- echo "<a href='http://pointyhat.freebsd.org/errorlogs/$arch-$branch-latest'>" >> ${TMPFILE}
- echo "$n_errors</a></td>" >> ${TMPFILE}
# column: duds count
n_duds=0
if [ -f $directory/duds ]; then
n_duds=`cat $directory/duds | wc -l`
fi
- echo "<td align='right'>$n_duds</td>" >> ${TMPFILE}
# column: missing count
if [ $n_index -ne 0 ]; then
@@ -105,7 +93,6 @@ for arch in ${SUPPORTED_ARCHS}; do
else # index currently being rebuilt
n_missing=0
fi
- echo "<td align='right'>$n_missing</td>" >> ${TMPFILE}
# column: done flag
done_flag="N"
@@ -114,8 +101,21 @@ for arch in ${SUPPORTED_ARCHS}; do
done_flag="Y"
fi
fi
- echo "<td align='center'>$done_flag</td>" >> ${TMPFILE}
+ # now write the row
+ echo "<tr>" >> ${TMPFILE}
+ echo "<th align='left'>$arch-$branch</th>" >> ${TMPFILE}
+ echo "<td align='left'>$latest</td>" >> ${TMPFILE}
+ echo "<td align='right'>$n_index</td>" >> ${TMPFILE}
+ echo "<td align='right'>" >> ${TMPFILE}
+ echo "<a href='http://pointyhat.freebsd.org/errorlogs/$arch-$branch-latest-logs'>" >> ${TMPFILE}
+ echo "$n_packages</a></td>" >> ${TMPFILE}
+ echo "<td align='right'>" >> ${TMPFILE}
+ echo "<a href='http://pointyhat.freebsd.org/errorlogs/$arch-$branch-latest'>" >> ${TMPFILE}
+ echo "$n_errors</a></td>" >> ${TMPFILE}
+ echo "<td align='right'>$n_duds</td>" >> ${TMPFILE}
+ echo "<td align='right'>$n_missing</td>" >> ${TMPFILE}
+ echo "<td align='center'>$done_flag</td>" >> ${TMPFILE}
echo "</tr>" >> ${TMPFILE}
done