summaryrefslogblamecommitdiffstats
path: root/bin/update_doc-index
blob: a64cf142164bfaca60bd0f464fa81d2cdb392e0d (plain) (tree)



















                                                                          
#!/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