emacs.d/.githooks/post-merge

19 lines
483 B
Plaintext
Raw Normal View History

#!/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: