diff --git a/etc/gen-doc-index.sh b/etc/gen-doc-index.sh index d4d0780..70529ec 100755 --- a/etc/gen-doc-index.sh +++ b/etc/gen-doc-index.sh @@ -6,12 +6,22 @@ cd public cp dev/*/index.html index.html function filter { - gawk "$1" < index.html > index.html.tmp + awk "$1" < index.html > index.html.tmp mv index.html.tmp index.html } -filter '{if ($0 ~ /button>$/) {printf "%s", $0; next}; print}' -filter '{print gensub(/('\''|")\.\.\//, "\\1dev/", "g")}' +filter '{ + if ($0 ~ /button>$/) { + printf "%s", $0 + getline + } + print +}' +filter '{ + gsub(/'\''\.\.\//, "'\''dev/") + gsub(/"\.\.\//, "\"dev/") + print +}' filter '{ gsub(/<\/nav>/, "\013") sub(/