2002-05-20 13:33:17 +02:00
|
|
|
#!/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.
|
|
|
|
#
|
2012-05-17 21:12:14 +02:00
|
|
|
# $FreeBSD$
|
2002-05-20 12:44:35 +02:00
|
|
|
|
2002-05-20 13:33:17 +02:00
|
|
|
CVSCMD='cvs -QR'
|
|
|
|
INDEX=ports/INDEX
|
|
|
|
|
|
|
|
echo "*** Refreshing ports.log status"
|
|
|
|
cp ports.log ports.log1
|
|
|
|
|
|
|
|
$CVSCMD co $INDEX
|
|
|
|
|
2002-05-20 16:33:43 +02:00
|
|
|
$CVSCMD log $INDEX |
|
|
|
|
awk '$1 ~ /^revision/ {
|
|
|
|
print $2
|
|
|
|
next
|
|
|
|
}
|
|
|
|
$1 ~ /^date/ {
|
|
|
|
print $2 " " substr($3, 1, length($3)-1)
|
|
|
|
next
|
|
|
|
}' |
|
|
|
|
while read rev ; do
|
|
|
|
read date
|
2002-05-20 13:33:17 +02:00
|
|
|
grep "$date" ports.log > /dev/null 2>&1
|
|
|
|
if [ $? = 1 ]; then
|
|
|
|
echo $date
|
2002-05-20 16:33:43 +02:00
|
|
|
$CVSCMD up -r "$rev" $INDEX
|
2002-05-20 13:33:17 +02:00
|
|
|
echo $date $(wc -l < $INDEX) >> ports.log1
|
|
|
|
fi
|
2002-05-20 12:44:35 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# Remove dupes.
|
2002-05-20 13:33:17 +02:00
|
|
|
sort -u ports.log1 > ports.log
|
2002-05-20 12:44:35 +02:00
|
|
|
|
2002-05-20 13:33:17 +02:00
|
|
|
# Cleanup
|
|
|
|
rm ports.log1
|
|
|
|
rm -r ports
|
2002-05-20 12:44:35 +02:00
|
|
|
|