blob: a64cf142164bfaca60bd0f464fa81d2cdb392e0d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
(
echo "<ul>"
find /usr/share/doc -name 'index.html' | \
sed 's/index.html$//' | \
sort | \
awk '{
if (0 == index($1,OLD_PREFIX) || OLD_PREFIX=="") {
print $0
OLD_PREFIX=$1
}
}' | \
sed 's/$/index.html/
s/^\(.*\)$/<li><a href="\1">\1<\/a><\/li>/'
echo "</ul>"
) > ~/doc_index.html
|