Created
September 18, 2019 01:39
-
-
Save geta6/c1aeb29755e107122eb8bba67bb06583 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# Create missing home directories | |
[[ ! -d ~/Developer ]] && mkdir ~/Developer | |
[[ ! -d ~/Sites ]] && mkdir ~/Sites | |
# Install homebrew | |
if [ ! -x "`which brew`" ]; then | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
# Homebrew formulae | |
echo '> Install Homebrew Formulae' | |
brew install \ | |
openssl \ | |
readline \ | |
yarn \ | |
git \ | |
hub \ | |
tig \ | |
htop \ | |
the_silver_searcher \ | |
tmux \ | |
mysql \ | |
redis | |
# Homebrew casks | |
echo '> Install Homebrew Casks' | |
brew cask install \ | |
figma \ | |
firefox \ | |
google-chrome \ | |
gyazo \ | |
slack \ | |
visual-studio-code | |
# Install missing header files | |
if [ -d "/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg" ]; then | |
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / | |
fi | |
# Export configuration options | |
if [ -x "`which brew`" ]; then | |
export CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl)" | |
fi | |
# Create ssh | |
if [ ! -d ~/.ssh ]; then | |
mkdir -p ~/.ssh | |
chmod 700 ~/.ssh | |
fi | |
# Node.js | |
if [ ! -d ~/.nodenv ]; then | |
git clone https://github.com/nodenv/nodenv.git ~/.nodenv && cd ~/.nodenv && ./src/configure && make -C src | |
fi | |
if [ ! -d ~/.nodenv/plugins/node-build ]; then | |
git clone https://github.com/nodenv/node-build.git ~/.nodenv/plugins/node-build | |
fi | |
if [ ! -d ~/.nodenv/plugins/nodenv-update ]; then | |
git clone https://github.com/nodenv/nodenv-update.git ~/.nodenv/plugins/nodenv-update | |
fi | |
if [ ! -d ~/.nodenv/plugins/node-build-update-defs ]; then | |
git clone https://github.com/nodenv/node-build-update-defs.git ~/.nodenv/plugins/node-build-update-defs | |
fi | |
# Ruby | |
if [ ! -d ~/.rbenv ]; then | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv && cd ~/.rbenv && ./src/configure && make -C src | |
fi | |
if [ ! -d ~/.rbenv/plugins/ruby-build ]; then | |
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
fi | |
if [ ! -d ~/.rbenv/plugins/rbenv-update ]; then | |
git clone https://github.com/rkh/rbenv-update.git ~/.rbenv/plugins/rbenv-update | |
fi | |
# Install versions | |
source ~/.zpreztorc | |
if [ ! -x "`which nodenv`" ]; then | |
export PATH="$HOME/.nodenv/bin:$HOME/.nodenv/shims:$PATH" | |
eval "$(nodenv init -)" | |
fi | |
nodenv update-version-defs | |
nodenv install -s 12.10.0 | |
nodenv global 12.10.0 | |
nodenv rehash | |
if [ ! -x "`which rbenv`" ]; then | |
export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" | |
eval "$(rbenv init -)" | |
fi | |
rbenv install -s 2.6.3 | |
rbenv global 2.6.3 | |
rbenv rehash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment