summary refs log tree commit diff stats
path: root/hooks
diff options
context:
space:
mode:
authorAlan Pearce2014-04-27 12:28:08 +0100
committerAlan Pearce2014-04-27 12:28:08 +0100
commitfa4613b16d19a7389d056f9ad10c2d9590ef1097 (patch)
tree4210f864459ad4d8ac9f5b9667edadce41bf81f6 /hooks
parentbdf40c97b2fdb48aa509c76ba1ad3f5d86839fb6 (diff)
downloaddotfiles-fa4613b16d19a7389d056f9ad10c2d9590ef1097.tar.lz
dotfiles-fa4613b16d19a7389d056f9ad10c2d9590ef1097.tar.zst
dotfiles-fa4613b16d19a7389d056f9ad10c2d9590ef1097.zip
rcm: Install Cask for Emacs if it isn't already
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/post-up/emacs14
1 files changed, 10 insertions, 4 deletions
diff --git a/hooks/post-up/emacs b/hooks/post-up/emacs
index 6b04ae0..8bd7609 100755
--- a/hooks/post-up/emacs
+++ b/hooks/post-up/emacs
@@ -2,11 +2,17 @@
 
 if [[ -s $commands[emacs] ]]
 then
-	if [[ -s $commands[cask] ]]
+	if [[ -z $commands[cask] ]]
 	then
-		pushd ~/.emacs.d
-		cask install
-		popd
+		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/
 fi