aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/portbuild
diff options
context:
space:
mode:
authorlinimon <linimon@FreeBSD.org>2006-06-29 06:46:18 +0800
committerlinimon <linimon@FreeBSD.org>2006-06-29 06:46:18 +0800
commit5f2542618e71bef064eacda6689599449b044afb (patch)
tree397f5f99d8312b23f009df510783ebe511cd3569 /Tools/portbuild
parentde54c44b553611e9303729abdd7981bbadec879d (diff)
downloadfreebsd-ports-gnome-5f2542618e71bef064eacda6689599449b044afb.tar.gz
freebsd-ports-gnome-5f2542618e71bef064eacda6689599449b044afb.tar.zst
freebsd-ports-gnome-5f2542618e71bef064eacda6689599449b044afb.zip
Handle the case where the size of INDEX is zero (e.g. during new builds).
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-xTools/portbuild/scripts/dopackagestats6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tools/portbuild/scripts/dopackagestats b/Tools/portbuild/scripts/dopackagestats
index f981ae250623..e077d96f780d 100755
--- a/Tools/portbuild/scripts/dopackagestats
+++ b/Tools/portbuild/scripts/dopackagestats
@@ -86,7 +86,11 @@ for arch in ${SUPPORTED_ARCHS}; do
echo "<td align='right'>$n_duds</td>" >> ${TMPFILE}
# column: missing count
- n_missing=`expr $n_index - $n_packages - $n_errors - $n_duds`
+ if [ $n_index -ne 0 ]; then
+ n_missing=`expr $n_index - $n_packages - $n_errors - $n_duds`
+ else # index currently being rebuilt
+ n_missing=0
+ fi
echo "<td align='right'>$n_missing</td>" >> ${TMPFILE}
# column: done flag