Created
July 7, 2014 14:22
-
-
Save kun432/38881edffbf7ff3467d4 to your computer and use it in GitHub Desktop.
setup OSX with Homebrew
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# HOMEBREW_GITHUB_API_TOKEN | |
if [ -f ~/.brew_api_token ];then | |
source ~/.brew_api_token | |
fi | |
# dotfiles | |
git clone https://github.com/kun432/dotfiles.git ~/dotfiles && ~/dotfiles/link_dotfiles.sh | |
# Homebrew | |
brew_exists=$(which brew) | |
if [ -z "$brew_exists" ]; then | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
fi | |
# oh-my-zsh | |
if [ ! -d ~/.oh-my-zsh ]; then | |
curl -L http://install.ohmyz.sh | sh | |
fi | |
# zsh path | |
zsh_path_exists=$(grep "/usr/local/bin/zsh" /etc/paths) | |
if [ -z "$zsh_path_exists" ]; then | |
cp -p /etc/paths /etc/paths.BAK | |
{ | |
echo "/usr/local/bin/zsh" | |
cat /etc/paths | |
} > /etc/paths | |
fi | |
# rbenv | |
rbenv_exists=$(grep "rbenv init" ~/.zshrc) | |
if [ -z "$rbenv_exists"]; then | |
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.zshrc | |
fi | |
# plenv | |
plenv_exists=$(grep "plenv init" ~/.zshrc) | |
if [ -z "$plenv_exists"]; then | |
echo 'if which plenv > /dev/null; then eval "$(plenv init -)"; fi' >> ~/.zshrc | |
fi | |
# Ricty | |
cp -f /usr/local/Cellar/ricty/3.2.3/share/fonts/Ricty*.ttf ~/Library/Fonts/ | |
fc-cache -vf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment