helm/rake/homebrew.rake

62 lines
1.2 KiB
Ruby
Raw Normal View History

2014-04-11 00:31:44 -07:00
require_relative "lib/output"
require_relative "lib/homebrew"
2014-06-15 22:24:05 -07:00
require_relative "lib/sh"
2014-04-11 00:31:44 -07:00
desc "Ensure homebrew is installed and up to date"
task :homebrew => 'homebrew:update'
2014-06-15 22:24:05 -07:00
verbose(false)
2014-04-11 00:31:44 -07:00
namespace :homebrew do
task :install do
unless Homebrew.is_installed?
echo "Installing Homebrew..."
Homebrew.bootstrap
end
2014-06-18 12:47:53 -07:00
Homebrew.tap 'homebrew/dupes'
Homebrew.tap 'caskroom/cask'
Homebrew.install 'brew-cask'
2014-04-11 00:31:44 -07:00
%w{
coreutils
wget
curl
tree
git
the_silver_searcher
tmux
gist
2014-04-13 08:46:20 -07:00
lua
luajit
2014-04-11 00:31:44 -07:00
}.each { |pkg| Homebrew.install pkg }
%w{
dropbox
appcleaner
vagrant
virtualbox
growlnotify
iterm2
java
launchbar
2014-04-11 00:31:44 -07:00
}.each { |app| Homebrew.install_cask app }
echo "Homebrew is installed. Moving on."
2014-04-11 00:31:44 -07:00
end
2014-06-17 19:28:52 -07:00
task :update => "homebrew:install" do
2014-04-11 00:31:44 -07:00
echo "Updating homebrew..."
Homebrew.update
end
desc "Remove homebrew cleanly"
2014-04-13 08:46:20 -07:00
task :remove do
2014-04-11 00:31:44 -07:00
Homebrew.destroy if Homebrew.is_installed?
end
end