2014-08-30 23:50:03 -07:00
|
|
|
require_relative "../lib/package"
|
|
|
|
|
|
|
|
if is_mac?
|
|
|
|
|
2014-09-20 13:37:45 -07:00
|
|
|
desc "Update/setup homebrew"
|
|
|
|
task :homebrew => "homebrew:update"
|
|
|
|
|
2014-08-30 23:50:03 -07:00
|
|
|
namespace :homebrew do
|
|
|
|
task :setup do
|
|
|
|
unless Package.installed?
|
|
|
|
echo "Installing Homebrew..."
|
|
|
|
Package.bootstrap
|
|
|
|
|
|
|
|
Package.tap 'homebrew/dupes'
|
|
|
|
Package.tap 'caskroom/cask'
|
|
|
|
end
|
|
|
|
|
|
|
|
Package.install 'brew-cask'
|
|
|
|
|
|
|
|
# Essentials for all macs; specific brews are placed
|
|
|
|
# in the node/*.rake files
|
2014-09-01 08:31:47 -07:00
|
|
|
[ "coreutils",
|
|
|
|
"wget",
|
|
|
|
"curl",
|
|
|
|
"tree",
|
|
|
|
"git",
|
2014-09-20 13:37:45 -07:00
|
|
|
"hub",
|
2014-09-01 08:31:47 -07:00
|
|
|
"the_silver_searcher",
|
|
|
|
"tmux",
|
|
|
|
"gist",
|
|
|
|
"lua",
|
|
|
|
"readline",
|
|
|
|
"openssl",
|
|
|
|
"node"
|
|
|
|
].each { |pkg| Package.install pkg }
|
2014-08-30 23:50:03 -07:00
|
|
|
|
2014-09-01 08:31:47 -07:00
|
|
|
[ "dropbox",
|
|
|
|
"appcleaner",
|
|
|
|
"vagrant",
|
|
|
|
"virtualbox",
|
|
|
|
"growlnotify",
|
|
|
|
"iterm2",
|
|
|
|
"java",
|
|
|
|
"launchbar"
|
|
|
|
].each { |app| Package.cask_install app }
|
2014-08-30 23:50:03 -07:00
|
|
|
|
|
|
|
echo "Homebrew is installed. Moving on."
|
|
|
|
end
|
|
|
|
|
|
|
|
task :update => "homebrew:setup" do
|
|
|
|
echo "Updating homebrew..."
|
|
|
|
Package.update
|
|
|
|
end
|
|
|
|
|
|
|
|
task :remove do
|
|
|
|
Package.destroy if Package.installed?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
elsif is_linux?
|
|
|
|
|
2014-09-20 13:37:45 -07:00
|
|
|
desc "Update/setup aptitude"
|
|
|
|
task :aptitude => "aptitude:update"
|
|
|
|
|
2014-08-30 23:50:03 -07:00
|
|
|
namespace :aptitude do
|
|
|
|
task :setup do
|
|
|
|
echo "Updating packages..."
|
|
|
|
Package.update
|
2014-09-01 08:31:47 -07:00
|
|
|
|
|
|
|
[ "git",
|
|
|
|
"tmux",
|
|
|
|
"curl",
|
|
|
|
"ruby2.0",
|
|
|
|
"rake"
|
|
|
|
].each { |pkg| Package.install pkg }
|
2014-08-30 23:50:03 -07:00
|
|
|
end
|
2014-09-01 08:31:47 -07:00
|
|
|
|
|
|
|
task :update => 'aptitude:setup'
|
2014-08-30 23:50:03 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|