diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/update_doc-index | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/update_doc-index b/bin/update_doc-index new file mode 100755 index 0000000..a64cf14 --- /dev/null +++ b/bin/update_doc-index @@ -0,0 +1,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 + |