miller/docs/genrst
2020-09-27 11:41:50 -04:00

16 lines
363 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
# Use poki to run the live-code bits within the markup files. See README.md for details.
names=$(echo *.rst.in | sed 's/\.rst\.in//g')
for name in $names; do
echo BUILDING $name
if [ -f $name.rst ]; then # Won't exist yet on first run
chmod u+w $name.rst
fi
poki < $name.rst.in > $name.rst
chmod 400 $name.rst
done