summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@praseodym.org>2015-03-12 15:14:58 +0000
committerGregor Kleen <gkleen@praseodym.org>2015-03-12 15:14:58 +0000
commitd99fdd1128468c618d1de7cc7b3f578498eccbe5 (patch)
tree3a57c4ee6a5de8a18dbcc2d150f0e9660e27927d
parentb2bba5786c0d629245ed8c280449d8a6b524eb45 (diff)
downloaddirty-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.do10
-rw-r--r--htdocs.do3
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 @@
1redo-ifchange $2.md build/tex-filter.hs build/template.html5 1redo-ifchange $2.md build/tex-filter.hs build/template.html5
2 2
3texfilter() {
4 runhaskell -package-conf=$(find .cabal-sandbox -maxdepth 1 -iname '*.conf.d' | head -n 1) build/tex-filter.hs $@
5}
6
3CSS=/style.css 7CSS=/style.css
4 8
5pandoc -t json $2.md | build/tex-filter.hs "$(pwd)" 2>&1 >/dev/null \ 9pandoc -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
11pandoc -S -f markdown -t json $2.md \ 17pandoc -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
diff --git a/htdocs.do b/htdocs.do
index 8470901..6e70576 100644
--- a/htdocs.do
+++ b/htdocs.do
@@ -1,2 +1,3 @@
1redo-ifchange all 1redo-ifchange all
2rsync -Rav --delete style.css *.html lists/*.html posts/*.html tex/*/*.svg htdocs/ >&2 2find . \( -name '*.html' -or -name '*.css' -or -name '*.svg' \) -and -not \( -path '*/.cabal-sandbox/*' -or -path '*/htdocs/*' -or -path '*/build/*' \) -print0 | \
3xargs -0 -I '{}' -- rsync -Rav --delete '{}' htdocs >&2