Mercurial > org-tools
annotate tangle.sh @ 4:de36470a2f70
simplified tangle
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 16 Oct 2011 08:23:26 -0700 |
parents | a838c4a7fb70 |
children | 73beed20f7de |
rev | line source |
---|---|
rlm@0 | 1 #!/bin/sh |
rlm@2 | 2 # assumes that there is a ./org directory, and tangles |
rlm@2 | 3 # each org file in it. |
rlm@2 | 4 |
rlm@0 | 5 DIR=`pwd` |
rlm@0 | 6 FILES="" |
rlm@0 | 7 |
rlm@2 | 8 for i in $(find $DIR/org -name "*.org"); do |
rlm@0 | 9 FILES="$FILES \"$i\"" |
rlm@0 | 10 done |
rlm@0 | 11 |
rlm@2 | 12 |
rlm@4 | 13 emacs --batch \ |
rlm@4 | 14 -l /home/r/config/emacs/clojure-init.el \ |
rlm@4 | 15 -l /home/r/config/emacs/org-init.el \ |
rlm@0 | 16 --eval "(progn |
rlm@0 | 17 (mapc (lambda (file) |
rlm@0 | 18 (find-file (expand-file-name file \"$DIR\")) |
rlm@0 | 19 (org-babel-tangle) |
rlm@0 | 20 (kill-buffer)) '($FILES)))" 2>&1 | pcregrep '(Wrote)|(tangled)' |