#!/usr/bin/env bash # # Bootstrap script for setting up a new OSX machine # # This should be idempotent so it can be run multiple times. # # Notes: # # - If installing full Xcode, it's better to install that first from the app # store before running the bootstrap script. Otherwise, Homebrew can't access # the Xcode libraries as the agreement hasn't been accepted yet. # # Reading: # # - http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac # - https://gist.github.com/MatthewMueller/e22d9840f9ea2fee4716 # - https://news.ycombinator.com/item?id=8402079 # - http://notes.jerzygangi.com/the-best-pgp-tutorial-for-mac-os-x-ever/ # # Found install script here: # # - https://gist.github.com/codeinthehole/26b37efa67041e1307db echo "Starting bootstrapping" echo "Installing Xcode commandline tools" xcode-select --install # Check for Homebrew, install if we don't have it if test ! $(which brew); then echo "Installing homebrew..." ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi # Update homebrew recipes brew update PACKAGES=( git markdown node npm wget ) echo "Installing packages..." brew install ${PACKAGES[@]} echo "Cleaning up..." brew cleanup echo "Installing cask..." brew install caskroom/cask/brew-cask CASKS=( slack firefox google-chrome sourcetree visual-studio-code ) echo "Installing cask apps..." brew cask install ${CASKS[@]} echo "Installing fonts..." brew tap caskroom/fonts FONTS=( font-inconsolidata font-firacode-nerd-font font-roboto font-source-sans-pro ) brew cask install ${FONTS[@]} echo "Installing nvm..." touch ~/.bash_profile curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash echo "Installing global npm packages..." npm install gulp gulp-cli -g echo "Bootstrapping complete"