Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
#
# Setup script for Mac with Homebrew / Homebrew-Cask
#
BASE_DIR='/usr/local'
BASE_BIN="$BASE_DIR/bin"
BASE_SHARE="$BASE_DIR/share"
BREW="$BASE_BIN/brew"
if [ ! -e $BREW ]; then
echo "ERROR: brew command not found !!"
exit 1;
fi
# update list
$BREW update
# install formula list
FORMULAS="
autoconf
automake
cmigemo
editorconfig
git
gnupg
gnutls
hg
highlight
imagemagick
jq
markdown
multimarkdown
node
openssl
p7zip
pcre
rbenv
readline
ruby-build
sary
stunnel
source-highlight
texi2html
texinfo
the_silver_searcher
tig
w3m
wget
"
# install go go
for FORMULA in $FORMULAS
do
$BREW install $FORMULA
done
# gnu global with options
$BREW install global --with-exuberant-ctags --with-pygments
# setup diff-highlight
DIFF_HIGHLIGHT="$BASE_SHARE/git-core/contrib/diff-highlight/diff-highlight"
if [ ! -e $DIFF_HIGHLIGHT ]; then
ln -s $DIFF_HIGHLIGHT $BASE_BIN/
fi
# install emacs from my Formula
$BREW tap suzuki/emacs
$BREW install suzuki/emacs/emacs --cocoa --srgb --use-git-head --HEAD --verbose
# depend_on above emacs
$BREW install cask
# Setups
## diff-highlight (git)
DIFF_HIGHLIGHT="$BASE_SHARE/git-core/contrib/diff-highlight/diff-highlight"
if [ -e $DIFF_HIGHLIGHT ]; then
ln -s $DIFF_HIGHLIGHT $BASE_BIN
fi
########################################################################
# Install Homebrew Cask
$BREW install caskroom/cask/brew-cask
$BREW tap caskroom/versions
# Setup Homebrew Cask
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
$BREW cask update
# install packages
CASK_FORMULAS="
dropbox
evernote
firefox
firefox-developer-edition
gyazo
google-chrome
google-drive
google-japanese-ime
heroku-toolbelt
hipchat
hoster
iterm2
java7
karabiner
licecap
omnigraffle
onepassword
rescuetime
skitch
slack
"
for FORMULA in $CASK_FORMULAS
do
$BREW cask install $FORMULA
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.