home · contact · privacy
Move work so far into repo.
[redo-blog] / default.intermediate.do
diff --git a/default.intermediate.do b/default.intermediate.do
new file mode 100644 (file)
index 0000000..7470c3c
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+template=intermediate.tmpl
+uuidfile="${1%.intermediate}.uuid"
+redo-ifchange "$uuidfile"
+redo-ifchange "$template"
+mdfile="${1%.intermediate}.md"
+rstfile="${1%.intermediate}.rst"
+if [ -f "$rstfile" ]; then
+  redo-ifchange "$rstfile"
+  pandoc -f rst --template="$template" --mathml -t html5 "$rstfile" > "$3"
+elif [ -f "$mdfile" ]; then
+  redo-ifchange "$mdfile"
+  pandoc -f markdown --template="$template" --mathml -t html5 "$mdfile" > "$3"
+fi