annotate 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
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@0 13 emacs -Q --batch \
rlm@0 14 --eval "(progn
rlm@0 15 (add-to-list 'load-path (expand-file-name \"/home/r/config/emacs/extend/org-mode/lisp/\"))
rlm@0 16 (add-to-list 'load-path (expand-file-name \"/home/r/config/emacs/extend/org-mode/contrib/lisp/\"))
rlm@0 17 (require 'org)(require 'org-exp)(require 'ob)(require 'ob-tangle)
rlm@0 18 (mapc (lambda (file)
rlm@0 19 (find-file (expand-file-name file \"$DIR\"))
rlm@0 20 (org-babel-tangle)
rlm@0 21 (kill-buffer)) '($FILES)))" 2>&1 | pcregrep '(Wrote)|(tangled)'