summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2013-05-18 17:48:48 +0100
committerAlan Pearce2013-05-18 17:48:48 +0100
commit9c6faab4adf09bd93e3ae84174df220538fa9a0b (patch)
tree3b101b947929f0da41506a5d87dd4d9cdfeb5930
parent41d5123ac903f11518ee8dfbda79a69750ba1698 (diff)
downloaddotfiles-9c6faab4adf09bd93e3ae84174df220538fa9a0b.tar.lz
dotfiles-9c6faab4adf09bd93e3ae84174df220538fa9a0b.tar.zst
dotfiles-9c6faab4adf09bd93e3ae84174df220538fa9a0b.zip
Add git hooks to recompile emacs init file and elisp directory
-rwxr-xr-xgit-hooks/post-checkout6
-rwxr-xr-xinstall1
2 files changed, 7 insertions, 0 deletions
diff --git a/git-hooks/post-checkout b/git-hooks/post-checkout
new file mode 100755
index 0000000..dfceaee
--- /dev/null
+++ b/git-hooks/post-checkout
@@ -0,0 +1,6 @@
+#!/usr/bin/env zsh
+if [[ -x =emacs ]]
+then
+	emacs --batch -f batch-byte-compile ~/.emacs.d/init.el
+	emacs --batch -f batch-byte-compile ~/.emacs.d/elisp/*.el
+fi
diff --git a/install b/install
index d7e89c0..0596b3e 100755
--- a/install
+++ b/install
@@ -33,6 +33,7 @@ install-dot () {
 	done
 }
 
+install-dot dotfiles/.git/hooks/ dotfiles/git-hooks/*
 install-dot .emacs.d/ dotfiles/emacs/*
 install-dot . dotfiles/^install(.) dotfiles/zsh/zshrc
 install-dot .ssh/ dotfiles/ssh/*