annotate weave.sh @ 16:f433fae15c50

made auto-weave work on all projects
author Robert McIntyre <rlm@mit.edu>
date Wed, 02 Nov 2011 05:01:57 -0700
parents 73beed20f7de
children 993b8d7d9bec
rev   line source
rlm@1 1 #!/bin/sh
rlm@1 2
rlm@1 3 # assumes ./org directory with org files to publish to
rlm@1 4 # ./html
rlm@1 5
rlm@6 6 target=$(readlink -f $1)
rlm@1 7
rlm@7 8 org=`dirname $target`
rlm@7 9
rlm@7 10 dir=`dirname $org`
rlm@1 11
rlm@8 12 emacs \
rlm@8 13 -l /home/r/config/emacs/clojure-init.el \
rlm@8 14 -l /home/r/config/emacs/org-init.el \
rlm@8 15 -l /home/r/config/emacs/web-color.el \
rlm@8 16 --batch \
rlm@1 17 --eval "
rlm@1 18 (progn
rlm@1 19 (setq org-publish-project-alist
rlm@1 20 '(
rlm@1 21 (\"project\"
rlm@1 22 :base-directory \"$dir/org\"
rlm@1 23 :base-extension \"org\"
rlm@1 24 :publishing-directory \"$dir/html\"
rlm@1 25 :recursive t
rlm@1 26 :publishing-function org-publish-org-to-html
rlm@1 27 :auto-preamble t)
rlm@1 28 ))
rlm@1 29
rlm@6 30 (org-publish-file \"$target\" '(\"project\"
rlm@6 31 :base-directory \"$dir/org\"
rlm@6 32 :base-extension \"org\"
rlm@6 33 :publishing-directory \"$dir/html\"
rlm@6 34 :recursive t
rlm@6 35 :publishing-function org-publish-org-to-html
rlm@6 36 :auto-preamble t)
rlm@6 37 ))" \
rlm@6 38 \
rlm@6 39 2>&1 #| pcregrep 'Wrote'
rlm@1 40
rlm@1 41
rlm@1 42
rlm@5 43
rlm@6 44
rlm@6 45
rlm@6 46