#!/bin/bash find "$@" -type d -print0 | xargs -n 1 -r0 bash -c '(shopt -s nullglob; cd "$0"; if (! test -e index.html) || test -e .make-index-html; then touch .make-index-html; echo "" > index.html; for i in */ *.html; do if test "$i" != "index.htm"; then echo "$i" >> index.html; fi; done; echo "" >> index.html; fi)'