. Don't require root access to run this script (check out own copy of

ports/INDEX)

. Check out and count line numbers for only revisions missing in ports.log
  (about 100 times speedup :-)

. Remove logic carried already by Makefile
This commit is contained in:
Alexey Zelkin 2002-05-20 11:33:17 +00:00
parent f9fc3e2baf
commit 903b4b5348
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=13154

View file

@ -1,25 +1,36 @@
#! /bin/sh -e
#!/bin/sh -ex
#
# Refresh source file used for ploting ports growth status.
#
# Get an information about all revisions listed in 'cvs log' and merge
# it with our current list. This lets us keep info about revisions that
# have been axed from the repository during ports/INDEX cleanup.
#
# $FreeBSD$
# Get a linecount for all the revisions listed in 'cvs log' and append
# to our current list. This lets us keep info for revisions that have
# been axed from the repository.
cvs log /usr/ports/INDEX |
CVSCMD='cvs -QR'
INDEX=ports/INDEX
echo "*** Refreshing ports.log status"
cp ports.log ports.log1
$CVSCMD co $INDEX
$CVSCMD log $INDEX |
sed -ne "s/^date: \([^;]*\);.*$/\1/p" |
while read date ; do
echo $date
cvs update -D "$date" /usr/ports/INDEX
echo $date $(wc -l < /usr/ports/INDEX) >> ports.log
grep "$date" ports.log > /dev/null 2>&1
if [ $? = 1 ]; then
echo $date
$CVSCMD up -D "$date" $INDEX
echo $date $(wc -l < $INDEX) >> ports.log1
fi
done
# Put INDEX back the way we found it.
cvs update -A /usr/ports/INDEX
# Remove dupes.
sort -u ports.log > ports.log1
mv ports.log1 ports.log
sort -u ports.log1 > ports.log
# Generate graph.
gnuplot ports.plt
# Cleanup
rm ports.log1
rm -r ports
# Interlace.
pngtopnm ports.png | pnmtopng -i > ports.png1
mv ports.png1 ports.png