rlm@0: #!/bin/sh rlm@0: # -*- mode: shell-script -*- rlm@0: # rlm@0: # tangle files with org-mode rlm@0: # rlm@0: DIR=`pwd` rlm@0: FILES="" rlm@0: rlm@0: # wrap each argument in the code required to call tangle on it rlm@0: for i in $@; do rlm@0: FILES="$FILES \"$i\"" rlm@0: done rlm@0: rlm@0: emacs -Q --batch \ rlm@0: --eval "(progn rlm@0: (add-to-list 'load-path (expand-file-name \"/home/r/config/emacs/extend/org-mode/lisp/\")) rlm@0: (add-to-list 'load-path (expand-file-name \"/home/r/config/emacs/extend/org-mode/contrib/lisp/\")) rlm@0: (require 'org)(require 'org-exp)(require 'ob)(require 'ob-tangle) rlm@0: (mapc (lambda (file) rlm@0: (find-file (expand-file-name file \"$DIR\")) rlm@0: (org-babel-tangle) rlm@0: (kill-buffer)) '($FILES)))" 2>&1 | pcregrep '(Wrote)|(tangled)'