| #!/usr/local/plan9/bin/rc |
| n=`{echo $i | sed 's/man//;s!/INDEX!!'} |
| cat $PLAN9/dist/manindextop.html | sed 's/NNN/'$n'/g' |
| # complicated sort order: want 9p.3, 9p-cmdbuf.3, 9pclient.3 |
| for (j in `{ls [a-z0-9:]*.[0-9]* >[2]/dev/null | sed 's/[.\-]/ &/g;s/\./ &/g' | sort | tr -d ' '}){ |
| n=`{grep '^\.TH' $j | sed 1q | awk '{print $3}'} |
| name=`{echo $j | sed 's/\..*//'} |
| echo '<tr height=1><td colspan=2 bgcolor=#cccccc>' |
| echo -n '<tr><td valign=top><a href="'$name'.html">'$name'('$n')</a><td>' |
| cat $PLAN9/dist/manindexbottom.html |
| } >$i.html && mv $i.html `{echo $i.html | tr A-Z a-z} |
| for (i in */[~.]*.[0-9]*){ |
| j=`{echo $i | 9 sed 's/\..*//'} |
| if(~ $verbose yes) echo $d/$p |
| troff -manhtml $i | troff2html -t 'Plan 9 from User Space'>/tmp/manweb.html |[2] silencer |
| sed '/<!-- TRAILER -->/q' /tmp/manweb.html |
| cat $PLAN9/dist/mantrailer.html |
| sed -n '/<!-- TRAILER -->/,$p' /tmp/manweb.html |
| } | $PLAN9/dist/addsrclinks >$d/$p.html |
| ./fixurls $PLAN9/man/man*/*.html |