diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2010-01-06 20:49:07 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2010-01-06 20:49:07 +0100 |
commit | 92ebe66d850fb65965a63e85a1883fef5033c8b7 (patch) | |
tree | 5ea808d2ad509b71915ad80452892ead2b9e3209 /bin/update_doc-index | |
parent | 248328f31a47a10deeb1be3801d259e846cc16d2 (diff) | |
download | helper-scripts-92ebe66d850fb65965a63e85a1883fef5033c8b7.tar.gz helper-scripts-92ebe66d850fb65965a63e85a1883fef5033c8b7.tar.xz helper-scripts-92ebe66d850fb65965a63e85a1883fef5033c8b7.zip |
Diffstat (limited to '')
-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 + |