Add stuff to HTML output.
This commit is contained in:
parent
3d16f519b6
commit
c14037d0a2
@ -10,70 +10,134 @@ ref_blk=`awk 'NR == 2 {print $3}' Tmp/Ref/_.df`
|
||||
echo $ref_blk
|
||||
|
||||
H=HTML/index.html
|
||||
echo "<HTML>" > ${H}
|
||||
echo '<HTML>
|
||||
<H1>FreeBSD Build Option Survey</H1>
|
||||
<P>
|
||||
This table shows the effect on various build options NO_* build
|
||||
options in FreeBSD.
|
||||
<P>
|
||||
For each option is shown the effect of applying it to buildworld
|
||||
alone, installworld alone or to both.
|
||||
<P>
|
||||
For each case is shown the size of the installworld image, the
|
||||
delta compared to the full installworld and the number of file
|
||||
system entries added, deleted or changed by the option.
|
||||
<P>
|
||||
The add/delete/change fields link to "mtree(1) -f -f" output
|
||||
for the relevant files.
|
||||
For the "changed" data, the first line is the reference copy
|
||||
and the second line is the result of the applied option.
|
||||
<H2>Technical notes</H2>
|
||||
<P>
|
||||
This table is generated by software that can be found in
|
||||
src/tools/tools/build_option_survey.
|
||||
<P>
|
||||
The installworld is made onto a 200MB UFS1 filesystem with
|
||||
4k blocksize and 512 bytes fragmentsize. This matches
|
||||
use nanoBSDs filesystem creation usage.
|
||||
<P>
|
||||
For reasons of randomness, the "usr/share/man/whatis" file varies
|
||||
in size from installworld to installworld, and this generally
|
||||
dithers the results by a few blocks in one or the other direction.
|
||||
' > ${H}
|
||||
|
||||
echo "<P>This table was created on `uname -rm` at `date`" >> ${H}
|
||||
echo "<HR>" >> ${H}
|
||||
echo "<TABLE border=2>" >> ${H}
|
||||
echo '
|
||||
|
||||
<TR>
|
||||
<TH COLSPAN=13>Build option survey</TH>
|
||||
<TH COLSPAN=16>Build option survey</TH>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TH ROWSPAN=2>make.conf</TH>
|
||||
<TH COLSPAN=4>InstallWorld</TH>
|
||||
<TH COLSPAN=4>BuildWorld</TH>
|
||||
<TH COLSPAN=4>Build + InstallWorld</TH>
|
||||
<TH COLSPAN=5>BuildWorld</TH>
|
||||
<TH COLSPAN=5>InstallWorld</TH>
|
||||
<TH COLSPAN=5>Build + InstallWorld</TH>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TH>Blocks</TH>
|
||||
<TH>Delta</TH>
|
||||
<TH COLSPAN=2>Files</TH>
|
||||
<TH COLSPAN=3>Files</TH>
|
||||
<TH>Blocks</TH>
|
||||
<TH>Delta</TH>
|
||||
<TH COLSPAN=2>Files</TH>
|
||||
<TH COLSPAN=3>Files</TH>
|
||||
<TH>Blocks</TH>
|
||||
<TH>Delta</TH>
|
||||
<TH COLSPAN=2>Files</TH>
|
||||
<TH COLSPAN=3>Files</TH>
|
||||
</TR>
|
||||
' >> $H
|
||||
echo '<TR><TD><I>[empty]</I></TD>' >> $H
|
||||
echo "<TD align=right>$ref_blk</TD>" >> $H
|
||||
echo "<TD></TD><TD></TD><TD></TD>" >> $H
|
||||
echo "<TD></TD><TD></TD><TD></TD><TD></TD>" >> $H
|
||||
echo "<TD align=right>$ref_blk</TD>" >> $H
|
||||
echo "<TD></TD><TD></TD><TD></TD>" >> $H
|
||||
echo "<TD></TD><TD></TD><TD></TD><TD></TD>" >> $H
|
||||
echo "<TD align=right>$ref_blk</TD>" >> $H
|
||||
echo "<TD></TD><TD></TD><TD></TD>" >> $H
|
||||
echo "<TD></TD><TD></TD><TD></TD><TD></TD>" >> $H
|
||||
echo "</TR>" >> $H
|
||||
|
||||
cat no_list | while read o
|
||||
grep -v '#' no_list | while read o
|
||||
do
|
||||
echo "# $o"
|
||||
m=`echo "$o=YES" | md5`
|
||||
echo "<TR>" >> $H
|
||||
echo "<TD>" >> $H
|
||||
cat Tmp/$m/iw/make.conf >> $H
|
||||
echo "</TD>" >> $H
|
||||
for d in iw bw w
|
||||
for d in bw iw w
|
||||
do
|
||||
if [ ! -d Tmp/$m/$d ] ; then
|
||||
echo "<TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD>" >> $H
|
||||
echo "<TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD>" >> $H
|
||||
continue
|
||||
fi
|
||||
if [ ! -f Tmp/$m/$d/_.df ] ; then
|
||||
echo "<TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD>" >> $H
|
||||
echo "<TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD>" >> $H
|
||||
continue
|
||||
fi
|
||||
blk=`awk 'NR == 2 {print $3}' Tmp/$m/$d/_.df`
|
||||
echo "<TD align=right>$blk</TD>" >> $H
|
||||
echo "<TD align=right>`expr $blk - $ref_blk`</TD>" >> $H
|
||||
mtree -f Tmp/Ref/_.mtree -f Tmp/$m/$d/_.mtree |
|
||||
sed '/^ /d' > HTML/$m.$d.mtree.txt
|
||||
mtree -f Tmp/Ref/_.mtree -f Tmp/$m/$d/_.mtree \
|
||||
> HTML/$m.$d.mtree.txt
|
||||
|
||||
sub=`grep -cv '^ ' < HTML/$m.$d.mtree.txt`
|
||||
add=`grep -c '^ ' < HTML/$m.$d.mtree.txt`
|
||||
echo "<TD align=right><A href=\"$m.$d.mtree.txt\">+$add</A></TD>" >> $H
|
||||
echo "<TD align=right><A href=\"$m.$d.mtree.txt\">-$sub</A></TD>" >> $H
|
||||
grep '^[^ ]' \
|
||||
HTML/$m.$d.mtree.txt > HTML/$m.$d.sub.txt
|
||||
grep '^ [^ ]' \
|
||||
HTML/$m.$d.mtree.txt > HTML/$m.$d.add.txt
|
||||
sed '
|
||||
/^ [^ ]/d
|
||||
/^[^ ]/d
|
||||
/ file$/d
|
||||
/ dir$/d
|
||||
/ link$/d
|
||||
' HTML/$m.$d.mtree.txt > HTML/$m.$d.chg.txt
|
||||
|
||||
rm -f HTML/$m.$d.mtree.txt
|
||||
|
||||
sub=`wc -l < HTML/$m.$d.sub.txt`
|
||||
add=`wc -l < HTML/$m.$d.add.txt`
|
||||
chg=`wc -l < HTML/$m.$d.chg.txt`
|
||||
chg=`expr $chg / 2`
|
||||
if [ $add -eq 0 ] ; then
|
||||
echo "<TD align=right>+$add</TD>" >> $H
|
||||
rm -f HTML/$m.$d.add.txt
|
||||
else
|
||||
echo "<TD align=right><A href=\"$m.$d.add.txt\">+$add</A></TD>" >> $H
|
||||
fi
|
||||
if [ $sub -eq 0 ] ; then
|
||||
echo "<TD align=right>-$sub</TD>" >> $H
|
||||
rm -f HTML/$m.$d.sub.txt
|
||||
else
|
||||
echo "<TD align=right><A href=\"$m.$d.sub.txt\">-$sub</A></TD>" >> $H
|
||||
fi
|
||||
if [ $chg -eq 0 ] ; then
|
||||
echo "<TD align=right>*$chg</TD>" >> $H
|
||||
rm -f HTML/$m.$d.chg.txt
|
||||
else
|
||||
echo "<TD align=right><A href=\"$m.$d.chg.txt\">*$chg</A></TD>" >> $H
|
||||
fi
|
||||
|
||||
done
|
||||
echo "</TR>" >> $H
|
||||
@ -81,5 +145,5 @@ done
|
||||
echo "</TABLE>" >> ${H}
|
||||
echo "</HTML>" >> ${H}
|
||||
|
||||
scp -r HTML phk@critter:/tmp
|
||||
#scp -r HTML phk@critter:/tmp
|
||||
#scp -r HTML phk@phk:www/misc/kernel_options
|
||||
|
Loading…
Reference in New Issue
Block a user