home · contact · privacy
Move everything that does not need to be top level dir into sub dir.
[redo-blog] / processor / .meta / 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