From fa4613b16d19a7389d056f9ad10c2d9590ef1097 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 27 Apr 2014 12:28:08 +0100 Subject: rcm: Install Cask for Emacs if it isn't already --- hooks/post-up/emacs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'hooks') 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 -- cgit 1.4.1