. 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:
parent
f9fc3e2baf
commit
903b4b5348
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=13154
1 changed files with 28 additions and 17 deletions
|
@ -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
|
CVSCMD='cvs -QR'
|
||||||
# to our current list. This lets us keep info for revisions that have
|
INDEX=ports/INDEX
|
||||||
# been axed from the repository.
|
|
||||||
cvs log /usr/ports/INDEX |
|
echo "*** Refreshing ports.log status"
|
||||||
|
cp ports.log ports.log1
|
||||||
|
|
||||||
|
$CVSCMD co $INDEX
|
||||||
|
|
||||||
|
$CVSCMD log $INDEX |
|
||||||
sed -ne "s/^date: \([^;]*\);.*$/\1/p" |
|
sed -ne "s/^date: \([^;]*\);.*$/\1/p" |
|
||||||
while read date ; do
|
while read date ; do
|
||||||
|
grep "$date" ports.log > /dev/null 2>&1
|
||||||
|
if [ $? = 1 ]; then
|
||||||
echo $date
|
echo $date
|
||||||
cvs update -D "$date" /usr/ports/INDEX
|
$CVSCMD up -D "$date" $INDEX
|
||||||
echo $date $(wc -l < /usr/ports/INDEX) >> ports.log
|
echo $date $(wc -l < $INDEX) >> ports.log1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
# Put INDEX back the way we found it.
|
|
||||||
cvs update -A /usr/ports/INDEX
|
|
||||||
|
|
||||||
# Remove dupes.
|
# Remove dupes.
|
||||||
sort -u ports.log > ports.log1
|
sort -u ports.log1 > ports.log
|
||||||
mv ports.log1 ports.log
|
|
||||||
|
|
||||||
# Generate graph.
|
# Cleanup
|
||||||
gnuplot ports.plt
|
rm ports.log1
|
||||||
|
rm -r ports
|
||||||
|
|
||||||
# Interlace.
|
|
||||||
pngtopnm ports.png | pnmtopng -i > ports.png1
|
|
||||||
mv ports.png1 ports.png
|
|
||||||
|
|
Loading…
Reference in a new issue