summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>2000-08-29 07:45:02 +0000
committerSatoshi Asami <asami@FreeBSD.org>2000-08-29 07:45:02 +0000
commitdd7b8f01ce8f0ff4ff4c325f6bfaf91799a0ef4b (patch)
treec46c9abfa09a4febbc3f46941396b0c2c02858ee /Tools
parentPass the maintainer hat to Steve who agreed to take it over. (diff)
Read package build log files and compile a list of "extra" files in an
HTML table format.
Notes
Notes: svn path=/head/; revision=32072
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/processlogs267
1 files changed, 67 insertions, 0 deletions
diff --git a/Tools/portbuild/scripts/processlogs2 b/Tools/portbuild/scripts/processlogs2
new file mode 100755
index 000000000000..ce53c32e6919
--- /dev/null
+++ b/Tools/portbuild/scripts/processlogs2
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+of=extras.html.new
+
+# delete .new file if it is more than a day old
+find $of -mtime +1 -delete 2>/dev/null
+
+if [ -f $of ]; then exit; fi
+
+if [ -e .stamp -a $(echo $(find . -newer .stamp -type f -name '*.log' 2>/dev/null | wc -l)) = "0" ]; then exit; fi
+
+echo "<html><head><title>List of extra files and directories</title>" >$of
+echo "<h1>List of extra files and directories</h1>" >>$of
+echo "</head><body>" >>$of
+
+touch .stamp
+
+grep '^extra: ' *.log > .tmp
+if [ $(echo $(cat .tmp | wc -l)) = 0 ]; then
+ echo "No extra files (yet)" >> $of
+else
+ set $(cat .tmp)
+ num=$(($# / 2))
+ if [ -s cvsdone ]; then
+ echo "(cvs update finished at: $(cat cvsdone))<br>" >> $of
+ fi
+ echo "(timestamp of newest log: $(ls -rtTl *.log | tail -1 | awk '{printf("%s %s %s %s\n",$6,$7,$8,$9)}'))<br><br>" >> $of
+ echo "<table border=1>" >>$of
+ echo "<tr><th>Log</th><th>Aff.</th><th>Size</th><th>Repository</th><th>Maintainer</th><th>Pathname</th></tr>" >>$of
+ while [ $# -gt 0 ]; do
+ log=$(echo $1 | sed -e 's/\.log:extra://')
+ echo -n "<tr><td>" >>$of
+ echo -n "<a name=\"$log.log\"></a>" >> $of
+ echo -n "<a href=\"$log.log\">" >>$of
+ echo -n $log >>$of
+ echo -n "</a>" >>$of
+ echo -n "</td><td align=right>" >>$of
+ affected=$(($(grep -cF $log < INDEX) - 1))
+ if [ $affected != 0 ]; then echo -n $affected >>$of; fi
+ echo -n "</td><td align=right>" >>$of
+ size=$(/bin/ls -sk $log.log | awk '{print $1}')
+ echo -n "$size KB" >>$of
+ echo -n "</td><td>" >>$of
+ dir=$(sed -n -e '3p' $log.log | awk '{print $4}' | sed -e 's,^/[^/]*/[^/]*/,,')
+ echo -n "<a href=\"http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/$dir\">$dir</a>" >>$of
+ echo -n "</td><td>" >>$of
+ maint=$(sed -n -e '4p' $log.log | awk '{print $3}')
+ maints="$maints $maint"
+ echo -n "<a href=\"mailto:$maint\">$maint</a>" >>$of
+ echo "</td><td>$2</td></tr>" >>$of
+ shift 2
+ done
+ echo "</table><br>" >> $of
+ echo "$num extra files<br>" >> $of
+fi
+
+rm .tmp
+
+echo "<hr>" >> $of
+echo "<a href=\"../\">back to top</a>" >> $of
+
+echo "</body></html>" >>$of
+
+mv -f $of extras.html
+
+echo $maints | sed -e 's/ /\
+/g' | sort -fu > maintainers