diff options
author | Gregor Kleen <gkleen@praseodym.org> | 2015-03-12 15:14:58 +0000 |
---|---|---|
committer | Gregor Kleen <gkleen@praseodym.org> | 2015-03-12 15:14:58 +0000 |
commit | d99fdd1128468c618d1de7cc7b3f578498eccbe5 (patch) | |
tree | 3a57c4ee6a5de8a18dbcc2d150f0e9660e27927d | |
parent | b2bba5786c0d629245ed8c280449d8a6b524eb45 (diff) | |
download | dirty-haskell.org-d99fdd1128468c618d1de7cc7b3f578498eccbe5.tar dirty-haskell.org-d99fdd1128468c618d1de7cc7b3f578498eccbe5.tar.gz dirty-haskell.org-d99fdd1128468c618d1de7cc7b3f578498eccbe5.tar.bz2 dirty-haskell.org-d99fdd1128468c618d1de7cc7b3f578498eccbe5.tar.xz dirty-haskell.org-d99fdd1128468c618d1de7cc7b3f578498eccbe5.zip |
Changes for working in a cabal sandbox
-rw-r--r-- | default.html.do | 10 | ||||
-rw-r--r-- | htdocs.do | 3 |
2 files changed, 10 insertions, 3 deletions
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 @@ | |||
1 | redo-ifchange $2.md build/tex-filter.hs build/template.html5 | 1 | redo-ifchange $2.md build/tex-filter.hs build/template.html5 |
2 | 2 | ||
3 | texfilter() { | ||
4 | runhaskell -package-conf=$(find .cabal-sandbox -maxdepth 1 -iname '*.conf.d' | head -n 1) build/tex-filter.hs $@ | ||
5 | } | ||
6 | |||
3 | CSS=/style.css | 7 | CSS=/style.css |
4 | 8 | ||
5 | pandoc -t json $2.md | build/tex-filter.hs "$(pwd)" 2>&1 >/dev/null \ | 9 | pandoc -t json $2.md | texfilter "$(pwd)" \ |
6 | | while read -r x; do | 10 | | while read -r x; do |
11 | [[ -z "${x}" ]] && continue | ||
7 | echo $x/image.svg | 12 | echo $x/image.svg |
13 | echo $x/image.svg >&2 | ||
8 | done \ | 14 | done \ |
9 | | xargs -d '\n' redo-ifchange | 15 | | xargs -d '\n' redo-ifchange |
10 | 16 | ||
11 | pandoc -S -f markdown -t json $2.md \ | 17 | pandoc -S -f markdown -t json $2.md \ |
12 | | build/tex-filter.hs "$(pwd)" 2>/dev/null \ | 18 | | texfilter "$(pwd)" \ |
13 | | pandoc --template=build/template.html5 --base-header-level=3 --standalone --email-obfuscation=none -f json -t html5 -c $CSS >$3 2>/dev/null | 19 | | pandoc --template=build/template.html5 --base-header-level=3 --standalone --email-obfuscation=none -f json -t html5 -c $CSS >$3 2>/dev/null |
@@ -1,2 +1,3 @@ | |||
1 | redo-ifchange all | 1 | redo-ifchange all |
2 | rsync -Rav --delete style.css *.html lists/*.html posts/*.html tex/*/*.svg htdocs/ >&2 | 2 | find . \( -name '*.html' -or -name '*.css' -or -name '*.svg' \) -and -not \( -path '*/.cabal-sandbox/*' -or -path '*/htdocs/*' -or -path '*/build/*' \) -print0 | \ |
3 | xargs -0 -I '{}' -- rsync -Rav --delete '{}' htdocs >&2 | ||