emacs.d/.githooks/post-merge
Gerard Vermeulen f56531b7bc Improve the work-flow demonstration features
* 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.
2021-11-30 09:35:15 +01:00

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: