Skip to content

Instantly share code, notes, and snippets.

@cbess
Last active July 19, 2018 12:27
Show Gist options
  • Select an option

  • Save cbess/8375415 to your computer and use it in GitHub Desktop.

Select an option

Save cbess/8375415 to your computer and use it in GitHub Desktop.
Smarter Homebrew dev box installer script (mini-boxen). OS X 10.8+
#!/bin/bash
# installs tools and apps for basic dev operations
# Created by Christopher Bess (2014)
# License: MIT
# updated: 2014-02-11
function msg() {
echo "> $1"
}
function bi() {
brew install $1
}
function bci() {
brew cask install $1
}
function ask() {
# ask, and exit if 'y' not given
echo "$1 [y|N]"
read -s -n 1 answer
if [ "$answer" != "y" ] ; then
echo "Exited."
exit 1
fi
}
function ask_to() {
# usage: confirm bi|bci app-name
# ask to install the app (confirm install)
echo "Install $2? [y|N]"
read -s -n 1 answer
if [ "$answer" == "y" ] ; then
$1 "$2"
fi
}
### install homebrew
# http://brew.sh/ | https://github.com/Homebrew/homebrew
if [ -e /usr/local/bin/brew ] ; then
msg "brew already installed"
else
msg "Installing brew..."
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
fi
msg "Checking system (brew doctor)..."
brew doctor
### install brew cask
# https://github.com/phinze/homebrew-cask
if brew cask > /dev/null ; then
msg "brew cask already installed"
else
msg "Installing brew cask..."
brew tap phinze/cask
bi brew-cask
fi
### install brews
ask "Install brews?"
# wxPython (& wxMac)
bi uncrustify
# -- optional --
ask_to bi wxwidgets # will take a while to install
### install casks
# https://github.com/phinze/homebrew-cask/tree/master/Casks
ask "Install casks (apps, plugins, etc)?"
## quick look plugins
# https://github.com/sindresorhus/quick-look-plugins
# markdown
bci qlmarkdown
# zip files
bci betterzipql
# app install pkgs
bci suspicious-package
## apps
bci adium
bci android-studio
bci bonjour-browser
bci cocoa-rest-client
bci colorpicker-developer
bci colorpicker-hex
bci cyberduck
bci icolors
bci livereload
bci mou
bci node
bci skitch
bci skype
bci snagit
bci sqlite-browser
bci textmate
bci the-unarchiver
bci uncrustifyx
# -- optional --
# requires user confirmation, wait for last
msg "Now for optional apps:"
ask_to bci quicklook-json
ask_to bci virtualbox
ask_to bci firefox
ask_to bci google-chrome
ask_to bci sourcetree
ask_to bci github
ask_to bci wunderlist
ask_to bci iterm2
ask_to bci intellij-idea-community
ask_to bci pycharm-community
ask_to bci textwrangler
ask_to bci bbedit
ask_to bci komodo-edit
ask_to bci mongohub
ask_to bci opera-mobile-emulator
ask_to bci vagrant
ask_to bci vlc
ask_to bci android-file-transfer
ask_to bci alfred
# disabled
# ask_to bci balsamiq-mockups
# ask_to bci webstorm
# ask_to bci omnidisksweeper
# ask_to bci path-finder
# ask_to bci sequel-pro
# ask_to bci transmit
# ask_to bci xscope
# ask_to bci vmware-fusion
# show installed apps
msg "Installed in: ~/Applications"
open $HOME/Applications
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment