Open GoogleCodeExporter opened 9 years ago
#!/dis/sh
# /man/*/INDEX generator by Pete Elmore
load std regex
for f in * {
if {~ $f INDEX} {raise continue}
ws := ${re sg '0intro' 'intro' $f}
h := ()
getlines {
(s n rest) := ${split ' ' $line}
if {~ $s .SH} {h = $n; raise continue}
if {no $h} {raise continue}
if {~ $h NAME} {ws = $ws $line} {raise break}
} < $f
ws = `{echo ${re sg '( |\\)-.*' '' $"ws} | tr A-Z a-z | tr -dc 'a-z0-9_/!~. -'}
for w in $ws {echo $w $f} | sort
} | uniq > INDEX
Original comment by powerman...@gmail.com
on 6 Dec 2012 at 12:01
Original issue reported on code.google.com by
powerman...@gmail.com
on 2 Dec 2012 at 4:49Attachments: