f56531b7bc
* Evaluate named source blocks automatically. This requires adapting the Makefile and the post-merge hook. * Add and tweak functions stolen from ox-extra.el. * Add a quick-start section. * Complete the .gitignore file.
19 lines
483 B
Bash
Executable File
19 lines
483 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
# See: https://gist.github.com/sindresorhus/7996717
|
|
|
|
job="$(git diff-tree -r --name-only --no-commit-id HEAD^ HEAD -- README.org)"
|
|
|
|
if [ -n "$job" ]; then
|
|
emacs --batch \
|
|
--eval "(add-to-list 'safe-local-eval-forms '(apply 'my-org-eval-blocks-named '(\"emacs-lisp-setup\")))" \
|
|
--eval "(require 'org)" \
|
|
--eval "(org-babel-tangle-file \"$job\")"
|
|
fi
|
|
|
|
# Local Variables:
|
|
# mode: shell-script
|
|
# sh-indentation: 2
|
|
# sh-basic-offset: 2
|
|
# End:
|