X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=default.intermediate.do;fp=default.intermediate.do;h=7470c3c11806051bdcaa84a0fcb1545062d99a41;hb=58272f437f554daa14ac1dfdf9902d48c17841bf;hp=0000000000000000000000000000000000000000;hpb=41db49b35f4622e7caa7aecd9b814d8a760fc259;p=redo-blog diff --git a/default.intermediate.do b/default.intermediate.do new file mode 100644 index 0000000..7470c3c --- /dev/null +++ b/default.intermediate.do @@ -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