Skip to content

Instantly share code, notes, and snippets.

@igilham
Created October 3, 2014 15:49
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save igilham/609e7daa935409fa1617 to your computer and use it in GitHub Desktop.
Save igilham/609e7daa935409fa1617 to your computer and use it in GitHub Desktop.
Automate setting up software from a fresh install on Mac OS X
#!/bin/sh
# mac setup automation script based on
# http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
# 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 'You should update your profile with the following:'
echo ' export PATH=$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH'
echo ' export PATH=$(brew --prefix coreutils)/libexec/gnuman:$MANPATH'
echo
echo 'The following env vars may be useful:'
echo ' export GOROOT=$(brew --prefix go)/libexec'
echo ' export M2_HOME=$(brew --prefix maven2)'
echo ' export M2=$M2_HOME/bin'
echo ' export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH'
# binaries
binaries=(
aspell
astyle
cmake
dos2unix
doxygen
ffmpeg
gcc
git
go
llvm
maven2
mercurial
p7zip
pngcrush
python
rbenv
rbenv-gem-rehash
ruby-build
sloccount
stunnel
subversion
trash
vim
wget
)
echo "installing binaries..."
brew install ${binaries[@]}
brew cleanup
# set up Cask
brew install caskroom/cask/brew-cask
# Apps
apps=(
adium
adobe-reader
atom
dropbox
eclipse-java
firefox
flux
gimp
google-chrome
libreoffice
macvim
sublime-text
textmate
virtualbox
vlc
)
# Install apps to /Applications
# Default is: /Users/$user/Applications
echo "installing apps..."
brew cask install --appdir="/Applications" ${apps[@]}
# fonts
brew tap caskroom/fonts
# fonts
fonts=(
font-open-sans
font-droid-sans
font-droid-sans-mono
font-droid-serif
font-merriweather
font-merriweather-sans
font-roboto
)
# install fonts
echo "installing fonts..."
brew cask install ${fonts[@]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment