2014-08-01 13:33:28 -07:00
|
|
|
if RUBY_PLATFORM =~ /darwin/
|
2014-04-11 00:31:44 -07:00
|
|
|
|
2014-08-01 13:33:28 -07:00
|
|
|
require_relative "../lib/output"
|
|
|
|
require_relative "../lib/homebrew"
|
|
|
|
require_relative "../lib/sh"
|
2014-04-11 00:31:44 -07:00
|
|
|
|
2014-08-01 13:33:28 -07:00
|
|
|
desc 'Install/update homebrew'
|
|
|
|
task :homebrew => 'homebrew:update'
|
2014-04-11 00:31:44 -07:00
|
|
|
|
2014-08-01 13:33:28 -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
|
|
|
|
|
2014-08-01 13:33:28 -07:00
|
|
|
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
|
|
|
|
2014-08-01 13:33:28 -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
|