helm/rake/pkg/homebrew.rake

66 lines
1.5 KiB
Ruby
Raw Normal View History

if RUBY_PLATFORM =~ /darwin/
2014-04-11 00:31:44 -07:00
require_relative "../lib/output"
require_relative "../lib/homebrew"
require_relative "../lib/sh"
2014-04-11 00:31:44 -07:00
desc 'Install/update homebrew'
task :homebrew => 'homebrew:update'
2014-04-11 00:31:44 -07:00
namespace :homebrew do
task :install do
unless Homebrew.is_installed?
echo "Installing Homebrew..."
Homebrew.bootstrap
end
Homebrew.tap 'homebrew/dupes'
Homebrew.tap 'caskroom/cask'
Homebrew.install 'brew-cask'
%w{
coreutils
wget
curl
tree
git
the_silver_searcher
tmux
gist
lua
luajit
readline
openssl
node
}.each { |pkg| Homebrew.install pkg }
%w{
dropbox
appcleaner
vagrant
virtualbox
growlnotify
iterm2
java
launchbar
}.each { |app| Homebrew.install_cask app }
echo "Homebrew is installed. Moving on."
2014-04-11 00:31:44 -07:00
end
desc "Update homebrew and upgrade brews"
task :update => "homebrew:install" do
echo "Updating homebrew..."
Homebrew.update
end
2014-04-11 00:31:44 -07:00
desc "Remove homebrew cleanly"
task :remove do
Homebrew.destroy if Homebrew.is_installed?
end
2014-04-11 00:31:44 -07:00
end
end