Skip to content

Instantly share code, notes, and snippets.

@neilberget
Created November 13, 2014 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilberget/03dfb00bd9bedbf042b6 to your computer and use it in GitHub Desktop.
Save neilberget/03dfb00bd9bedbf042b6 to your computer and use it in GitHub Desktop.
A script for setting up a new os x computer for development
#!/bin/sh
# 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
# Install GNU core utilities (those that come with OS X are outdated)
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install Bash 4
brew install bash
# Install more recent versions of some OS X tools
brew tap homebrew/dupes
brew install homebrew/dupes/grep
echo 'Set the following in your .bash_profile:'
echo '$PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH'
# Install binaries
binaries=(
python
node
ack
ag
git
phantomjs
)
echo "installing binaries..."
brew install ${binaries[@]}
brew cleanup
# Install Apps
brew install caskroom/cask/brew-cask
echo 'Search for apps to install with brew cask:'
echo '> brew cask search /google-chrome/'
# Apps
apps=(
alfred
dropbox
google-chrome
qlcolorcode
transmit
firefox
qlmarkdown
vagrant
flash
iterm2
shiori
sublime-text3
virtualbox
atom
mailbox
qlstephen
quicklook-json
sequel-pro
hipchat
)
# Install apps to /Applications
# Default is: /Users/$user/Applications
echo "installing apps..."
brew cask install --appdir="/Applications" ${apps[@]}
brew cask alfred link
# Install fonts
brew tap caskroom/fonts
echo 'Find fonts with:'
echo '> brew cask search /font-roboto/'
# fonts
fonts=(
font-m-plus
font-clear-sans
font-roboto
)
# install fonts
echo "installing fonts..."
brew cask install ${fonts[@]}
# Backup
pip install mackup
echo 'Backup your mac settings with:'
echo '> mackup backup'
echo
echo 'Restore your mac settings with:'
echo '> mackup restore'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment