From d99fdd1128468c618d1de7cc7b3f578498eccbe5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 12 Mar 2015 15:14:58 +0000 Subject: Changes for working in a cabal sandbox --- default.html.do | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'default.html.do') diff --git a/default.html.do b/default.html.do index c880f0b..b7e46ae 100644 --- a/default.html.do +++ b/default.html.do @@ -1,13 +1,19 @@ redo-ifchange $2.md build/tex-filter.hs build/template.html5 +texfilter() { + runhaskell -package-conf=$(find .cabal-sandbox -maxdepth 1 -iname '*.conf.d' | head -n 1) build/tex-filter.hs $@ +} + CSS=/style.css -pandoc -t json $2.md | build/tex-filter.hs "$(pwd)" 2>&1 >/dev/null \ +pandoc -t json $2.md | texfilter "$(pwd)" \ | while read -r x; do + [[ -z "${x}" ]] && continue echo $x/image.svg + echo $x/image.svg >&2 done \ | xargs -d '\n' redo-ifchange pandoc -S -f markdown -t json $2.md \ - | build/tex-filter.hs "$(pwd)" 2>/dev/null \ + | texfilter "$(pwd)" \ | pandoc --template=build/template.html5 --base-header-level=3 --standalone --email-obfuscation=none -f json -t html5 -c $CSS >$3 2>/dev/null -- cgit v1.2.3