blob: 7c32aa2a9d70dc19e02749b710697f31bea2f61c [file] [log] [blame]
#!/bin/bash
# Script for generating HTML output for the document locally.
set -eu
inputs="
index.md
mbmq-model.md
performance.md
transition-plan.md
shareable-channels.md
"
for input in $inputs; do
output="$(basename $input .md).html"
# Only regenerate the HTML file if the input file changed or this
# file (make.sh) changed.
if [ $input -nt $output -o make.sh -nt $output ]; then
echo -- regenerate $output
(echo '<style>body { width: 980px; margin: auto; } </style>';
cmark $input) | ./munge_links.py >$output.tmp
mv $output.tmp $output
fi
done