Easily provision your OS X workstation into a development machine.
The setup can be run multiple times on the same machine safely. It installs, upgrades, or skips packages based on what is already installed on the machine.
Make sure you've installed (and agreed with the terms of) XCode or the XCode Command Line Tools with:
xcode-select --install
When installing gcc
(you'll at least need it for RVM) using Homebrew it is recommended that you do install the Command Line Tools (even if you've already installed XCode). It will install a bottled (read: precompiled) version, which is very fast and speeds up the workstation setup.
Run the following to provision your OS X workstation:
./setup
Review the steps the setup is going to take and confirm with y
, Y
, yes
or YES
to continue.
If you want to setup an even better development machine, you can also use my OSX Settings and my Vim Settings.
- Install, update and configure Homebrew.
- Install or upgrade the Homebrew formulas:
- Configure ZSH as the default shell.
- Install RVM.
- Install the configured Rubies and set the default version.
- Install Bundler and upgrade to the latest Rubygems version.
- Install Homebrew Cask.
- Install or upgrade the list of OS X applications using Homebrew Cask:
- Configure OS X specific settings.
- Run any setup from ~/.workstation.local.
This setup installs several Ruby versions using RVM, see RUBY_VERSIONS
in sh/configuration
. It also (amongst other things) sets a different default screen capture location (see DEFAULT_SCREENCAPTURE_LOCATION
). To change any of these settings, go ahead and adjust the sh/configuration
file to your liking.
The ~/.workstation.local
file (the location of this file can also be changed in sh/configuration
) is run at the very end of the setup. If you want to add any additional packages (Homebrew formulas) or OS X applications, you can add them to that file using the brew_install_or_upgrade
and cask_install_or_upgrade
functions.
The helper functions title
, info
, fail
and success
can also be used for nicely colored output. For example:
#!/bin/bash
title "Google Chrome"
info "Installing Google Chrome"
cask_install_or_upgrade "google-chrome"
success "Google Chrome has been installed."
This is heavily inspired by others, but mostly by @thoughtbot.