summary refs log tree commit diff stats
path: root/hooks/post-up/emacs
blob: 2e907f7cd4001bcd7356ba29c7159d9ff26ab6a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env zsh

if [[ -s $commands[emacs] ]]
then
	if [[ -z $commands[cask] ]]
	then
		git clone git://github.com/cask/cask ~/.cask
		if [[ ! -d ~/bin ]]
		then
			mkdir ~/bin
		fi
		ln -s ~/.cask/bin/cask ~/bin/cask
	fi
	pushd ~/.emacs.d
	cask install
	popd
	emacs --batch --eval '(batch-byte-recompile-directory 0)' ~/.emacs.d/elisp
fi