From 0671258eac8175003701ee22916c139692e9ecf6 Mon Sep 17 00:00:00 2001 From: asami Date: Tue, 29 Aug 2000 07:45:02 +0000 Subject: Read package build log files and compile a list of "extra" files in an HTML table format. --- Tools/portbuild/scripts/processlogs2 | 67 ++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100755 Tools/portbuild/scripts/processlogs2 (limited to 'Tools') 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 "List of extra files and directories" >$of +echo "

List of extra files and directories

" >>$of +echo "" >>$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))
" >> $of + fi + echo "(timestamp of newest log: $(ls -rtTl *.log | tail -1 | awk '{printf("%s %s %s %s\n",$6,$7,$8,$9)}'))

" >> $of + echo "" >>$of + echo "" >>$of + while [ $# -gt 0 ]; do + log=$(echo $1 | sed -e 's/\.log:extra://') + echo -n "" >>$of + shift 2 + done + echo "
LogAff.SizeRepositoryMaintainerPathname
" >>$of + echo -n "" >> $of + echo -n "" >>$of + echo -n $log >>$of + echo -n "" >>$of + echo -n "" >>$of + affected=$(($(grep -cF $log < INDEX) - 1)) + if [ $affected != 0 ]; then echo -n $affected >>$of; fi + echo -n "" >>$of + size=$(/bin/ls -sk $log.log | awk '{print $1}') + echo -n "$size KB" >>$of + echo -n "" >>$of + dir=$(sed -n -e '3p' $log.log | awk '{print $4}' | sed -e 's,^/[^/]*/[^/]*/,,') + echo -n "$dir" >>$of + echo -n "" >>$of + maint=$(sed -n -e '4p' $log.log | awk '{print $3}') + maints="$maints $maint" + echo -n "$maint" >>$of + echo "$2

" >> $of + echo "$num extra files
" >> $of +fi + +rm .tmp + +echo "
" >> $of +echo "back to top" >> $of + +echo "" >>$of + +mv -f $of extras.html + +echo $maints | sed -e 's/ /\ +/g' | sort -fu > maintainers -- cgit