From b7c400cb1ce1bd88aca6a2d53c39fd820e3d82c6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 1 Aug 2014 16:33:28 -0400 Subject: [PATCH] First step toward cross mac-ubuntu compatibility --- README.md | 4 +- rake/node/callisto.rake | 5 -- rake/pkg/homebrew.rake | 106 +++++++++++++++++++++------------------- 3 files changed, 56 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 0600bf7e..6f174d35 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Dotfiles of a spaghetti code warrior -My mac dotfiles. +My mac and ubuntu/debian dotfiles. Yes. They bite. - -(Check out the ubuntu branch for debian dotfiles) diff --git a/rake/node/callisto.rake b/rake/node/callisto.rake index 6360bdf8..aa59d4e3 100644 --- a/rake/node/callisto.rake +++ b/rake/node/callisto.rake @@ -2,12 +2,7 @@ desc "Provision home server" task :callisto do %w{ - osx - homebrew zsh vim - nginx - mongodb - gitlab }.each { |task| Rake::Task[task].invoke } end diff --git a/rake/pkg/homebrew.rake b/rake/pkg/homebrew.rake index b6a574a7..92d33899 100644 --- a/rake/pkg/homebrew.rake +++ b/rake/pkg/homebrew.rake @@ -1,61 +1,65 @@ -require_relative "../lib/output" -require_relative "../lib/homebrew" -require_relative "../lib/sh" +if RUBY_PLATFORM =~ /darwin/ -desc 'Install/update homebrew' -task :homebrew => 'homebrew:update' + require_relative "../lib/output" + require_relative "../lib/homebrew" + require_relative "../lib/sh" -namespace :homebrew do + desc 'Install/update homebrew' + task :homebrew => 'homebrew:update' - task :install do - unless Homebrew.is_installed? - echo "Installing Homebrew..." - Homebrew.bootstrap + 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." end - Homebrew.tap 'homebrew/dupes' - Homebrew.tap 'caskroom/cask' - Homebrew.install 'brew-cask' + desc "Update homebrew and upgrade brews" + task :update => "homebrew:install" do + echo "Updating homebrew..." + Homebrew.update + end - %w{ - coreutils - wget - curl - tree - git - the_silver_searcher - tmux - gist - lua - luajit - readline - openssl - node - }.each { |pkg| Homebrew.install pkg } + desc "Remove homebrew cleanly" + task :remove do + Homebrew.destroy if Homebrew.is_installed? + end - %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