home · contact · privacy
Unhide metadata directory, move helpers script up in tree.
[redo-blog] / processor / metadata / default.intermediate.do
1 #!/bin/sh
2
3 template=intermediate.tmpl
4 uuidfile="${1%.intermediate}.uuid"
5 redo-ifchange "$uuidfile"
6 redo-ifchange "$template"
7 mdfile="../${1%.intermediate}.md"
8 rstfile="../${1%.intermediate}.rst"
9 if [ -f "$rstfile" ]; then
10   redo-ifchange "$rstfile"
11   pandoc -f rst --template="$template" --mathml -t html5 "$rstfile" > "$3"
12 elif [ -f "$mdfile" ]; then
13   redo-ifchange "$mdfile"
14   pandoc -f markdown --template="$template" --mathml -t html5 "$mdfile" > "$3"
15 fi