First step toward cross mac-ubuntu compatibility

This commit is contained in:
Henrik Lissner 2014-08-01 16:33:28 -04:00
parent dcb35d2711
commit b7c400cb1c
3 changed files with 56 additions and 59 deletions

View file

@ -1,7 +1,5 @@
# Dotfiles of a spaghetti code warrior # Dotfiles of a spaghetti code warrior
My mac dotfiles. My mac and ubuntu/debian dotfiles.
Yes. They bite. Yes. They bite.
(Check out the ubuntu branch for debian dotfiles)

View file

@ -2,12 +2,7 @@
desc "Provision home server" desc "Provision home server"
task :callisto do task :callisto do
%w{ %w{
osx
homebrew
zsh zsh
vim vim
nginx
mongodb
gitlab
}.each { |task| Rake::Task[task].invoke } }.each { |task| Rake::Task[task].invoke }
end end

View file

@ -1,61 +1,65 @@
require_relative "../lib/output" if RUBY_PLATFORM =~ /darwin/
require_relative "../lib/homebrew"
require_relative "../lib/sh"
desc 'Install/update homebrew' require_relative "../lib/output"
task :homebrew => 'homebrew:update' require_relative "../lib/homebrew"
require_relative "../lib/sh"
namespace :homebrew do desc 'Install/update homebrew'
task :homebrew => 'homebrew:update'
task :install do namespace :homebrew do
unless Homebrew.is_installed?
echo "Installing Homebrew..." task :install do
Homebrew.bootstrap 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."
end end
Homebrew.tap 'homebrew/dupes' desc "Update homebrew and upgrade brews"
Homebrew.tap 'caskroom/cask' task :update => "homebrew:install" do
Homebrew.install 'brew-cask' echo "Updating homebrew..."
Homebrew.update
end
%w{ desc "Remove homebrew cleanly"
coreutils task :remove do
wget Homebrew.destroy if Homebrew.is_installed?
curl end
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."
end
desc "Update homebrew and upgrade brews"
task :update => "homebrew:install" do
echo "Updating homebrew..."
Homebrew.update
end
desc "Remove homebrew cleanly"
task :remove do
Homebrew.destroy if Homebrew.is_installed?
end end
end end