Add a hook to sync early-init.el and init.el with README.org

This commit is contained in:
Gerard Vermeulen 2021-11-29 16:17:34 +01:00
parent 063cdadbcf
commit a831acf4ca
3 changed files with 16 additions and 9 deletions

13
.githooks/post-merge Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env sh
job="$(git diff-tree -r --name-only --no-commit-id HEAD^ HEAD README.org)"
if [ -n "$job" ]; then
emacs --batch --eval "(require 'org)" --eval "(org-babel-tangle-file \"$job\")"
fi
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# sh-basic-offset: 2
# End:

9
1ST-ME
View File

@ -1,9 +0,0 @@
#!/usr/bin/env sh
emacs --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "README.org")'
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# sh-basic-offset: 2
# End:

3
Makefile Normal file
View File

@ -0,0 +1,3 @@
init:
git config core.hooksPath .githooks
emacs --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "README.org")'