Markdown source build system

This commit is contained in:
Ian Gulliver
2019-04-14 22:40:18 +00:00
parent d636349411
commit 22b83149aa
2 changed files with 22 additions and 0 deletions

12
markdown/build-html.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash -e
BASEDIR=$(dirname $0)
for FILE in $BASEDIR/*.md; do
BASENAME=$(basename $FILE)
OUTNAME=${BASENAME%.md}.html
echo "$BASENAME -> $OUTNAME"
TEMP=$(tempfile --dir=$BASEDIR)
markdown $FILE > $TEMP
mv $TEMP $BASEDIR/../$OUTNAME
done