diff options
-rwxr-xr-x | check | 13 | ||||
-rwxr-xr-x | format.sh | 2 |
2 files changed, 14 insertions, 1 deletions
@@ -30,6 +30,10 @@ fi echo Formatting docs ======================================== ./format.sh +plugindocs() { + ls -1 vmdb/plugins/*.mdwn +} + steps() { sed -n '/<h2 id="step-.*> Step: /s///p' vmdb2.html } @@ -43,6 +47,15 @@ panic() { exit 1 } +for doc in $(plugindocs) +do + n="$(grep -c '^Step:' "$doc")" + if [ "$n" != 1 ] + then + panic "Plugin doc $doc must have exactly 1 step title" + fi +done + n="$(code | wc -l)" if [ "$n" != 0 ] then @@ -9,7 +9,7 @@ cleanup() trap cleanup EXIT -cat vmdb2.md vmdb/plugins/*.mdwn > tmp.md +(cat vmdb2.md; for x in vmdb/plugins/*.mdwn; do cat "$x"; echo; done) > tmp.md if command -v sp-docgen > /dev/null then sp-docgen tmp.md -o vmdb2.html |