summaryrefslogtreecommitdiffstats
path: root/bin/update_doc-index
diff options
context:
space:
mode:
Diffstat (limited to 'bin/update_doc-index')
-rwxr-xr-xbin/update_doc-index20
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
+