2014-07-17 05:11:18 -07:00
|
|
|
desc "Ensure emacs is installed and up to date"
|
|
|
|
task :emacs => "emacs:update"
|
|
|
|
|
|
|
|
namespace :emacs do
|
|
|
|
|
2014-07-17 05:18:53 -07:00
|
|
|
task :install do
|
2014-07-19 18:35:49 -07:00
|
|
|
unless Dir.exists?(File.expand_path("~/.emacs.d"))
|
|
|
|
github('hlissner/emacs.d', '~/.emacs.d')
|
|
|
|
Homebrew.install("emacs", "--with-gnutls --cocoa --keep-ctags --srgb")
|
2014-08-21 00:29:21 -07:00
|
|
|
Homebrew.install("homebrew/dupes/tidy", "--HEAD")
|
2014-07-19 18:35:49 -07:00
|
|
|
Homebrew.install "aspell"
|
|
|
|
|
|
|
|
sh_safe "/usr/local/bin/npm install jshint -g"
|
|
|
|
sh_safe "/usr/local/bin/npm install jsonlint -g"
|
|
|
|
end
|
2014-07-17 05:18:53 -07:00
|
|
|
end
|
2014-07-17 05:11:18 -07:00
|
|
|
|
2014-07-17 05:18:53 -07:00
|
|
|
task :update do
|
|
|
|
echo "Updating emacs.d"
|
|
|
|
sh_safe "cd ~/.emacs.d && git pull"
|
2014-07-17 05:11:18 -07:00
|
|
|
|
2014-07-19 18:35:49 -07:00
|
|
|
echo "You'll have to update emacs packages manually!"
|
2014-07-17 05:18:53 -07:00
|
|
|
end
|
2014-07-17 05:11:18 -07:00
|
|
|
|
2014-07-17 05:18:53 -07:00
|
|
|
task :remove do
|
|
|
|
echo "Uninstalling emacs"
|
|
|
|
Homebrew.remove "emacs"
|
|
|
|
Homebrew.remove "aspell"
|
2014-07-19 18:35:49 -07:00
|
|
|
rm_rf "~/.emacs.d" if Dir.exists?(File.expand_path("~/.emacs.d"))
|
2014-07-17 05:18:53 -07:00
|
|
|
end
|
2014-07-17 05:11:18 -07:00
|
|
|
|
|
|
|
end
|