Skip to content

Instantly share code, notes, and snippets.

@suzuki
Created March 25, 2015 06:17
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 suzuki/bc06d156895fc5fbfc7c to your computer and use it in GitHub Desktop.
Save suzuki/bc06d156895fc5fbfc7c to your computer and use it in GitHub Desktop.
#!/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