=== modified file 'render_files'
--- render_files 2017-11-07 00:15:04 +0000
+++ render_files 2017-11-07 00:12:35 +0000
@@ -1,24 +1,23 @@
#!/bin/sh
render() {
- mkdir -p head/${1%/*} || exit $?
- if test raw/"$1" -nt head.old/"$1".html -o '!' -e head.old/"$1".html; then
- # escaped="head/$(printf '%s\n' "$1" | sed 's/[#%|\\]/\\&/').html"
- # vim /dev/null 2>&1 raw/"$1" +'set modeline' +'e!' +'set nornu number fdm=manual' +TOhtml '+w! '"$escaped" '+qa!'
- # todo: HTML escape title
- {
- printf "%s\n" \
- '' \
- '
'$1'' '' &&
- pygmentize-2 -f html raw/"$1" &&
- printf "%s\n" ''
- } > head/.new."$1".html &&
- touch -r raw/"$1" head/.new."$1".html && \
- mv head/.new."$1".html head/"$1".html
- else
- mv head.old/"$1".html head/"$1".html
- fi
+ mkdir -p head/${1%/*} || exit $?
+ if test raw/"$1" -nt head.old/"$1".html -o '!' -e head.old/"$1".html; then
+ # escaped="head/$(printf '%s\n' "$1" | sed 's/[#%|\\]/\\&/').html"
+ # vim /dev/null 2>&1 raw/"$1" +'set modeline' +'e!' +'set nornu number fdm=manual' +TOhtml '+w! '"$escaped" '+qa!'
+ # todo: HTML escape title
+ {printf "%s\n" \
+ '' \
+ ''$1'' '' && \
+ pygmentize-2 -f html raw/"$1" && \
+ printf "%s\n" ''
+ } > head/.new."$1".html && \
+ touch -r raw/"$1" head/.new."$1".html && \
+ mv head/.new."$1".html head/"$1".html
+else
+ mv head.old/"$1".html head/"$1".html
+ fi
}