view tangle.sh @ 2:a838c4a7fb70

changed the semantics of tangle to match weave
author Robert McIntyre <rlm@mit.edu>
date Sat, 15 Oct 2011 09:23:57 -0700
parents fd36f08d32c5
children de36470a2f70
line wrap: on
line source
1 #!/bin/sh
2 # assumes that there is a ./org directory, and tangles
3 # each org file in it.
5 DIR=`pwd`
6 FILES=""
8 for i in $(find $DIR/org -name "*.org"); do
9 FILES="$FILES \"$i\""
10 done
13 emacs -Q --batch \
14 --eval "(progn
15 (add-to-list 'load-path (expand-file-name \"/home/r/config/emacs/extend/org-mode/lisp/\"))
16 (add-to-list 'load-path (expand-file-name \"/home/r/config/emacs/extend/org-mode/contrib/lisp/\"))
17 (require 'org)(require 'org-exp)(require 'ob)(require 'ob-tangle)
18 (mapc (lambda (file)
19 (find-file (expand-file-name file \"$DIR\"))
20 (org-babel-tangle)
21 (kill-buffer)) '($FILES)))" 2>&1 | pcregrep '(Wrote)|(tangled)'