#!/bin/sh VERSION=2.2.2 # Step 1. Initialize Profiles if [ ! -f ~/.profile ] then touch ~/.profile fi if [ ! -f ~/.zprofile ] then touch ~/.zprofile fi # Step 2. Configuring Paths if [ -e ~/.config/fish/config.fish ] then if ! grep -q ' /usr/local/bin' ~/.config/fish/config.fish || ! grep -q ' /usr/local/sbin' ~/.config/fish/config.fish then echo "Configuring: ~./config/fish/config.fish" sh -c "cat > ~/.config/fish/config.fish < /etc/paths < ~/.gemrc <<-EOS gem: --no-ri --no-rdoc EOS" else echo "Configured: ~/.gemrc" fi if [ ! -e ~/.psqlrc ] then echo "Configuring: ~/.psqlrc" sh -c "cat > ~/.psqlrc <<-EOS \x auto \timing EOS" else echo "Configured: ~/.psqlrc" fi if [ ! -e /usr/local/bin/rbenv ] then brew install rbenv brew install rbenv-gem-rehash fi if [ ! -e /usr/local/bin/ruby-build ] then brew install ruby-build fi if ! grep -q 'rbenv' ~/.profile then echo 'eval "$(rbenv init -)"' >> ~/.profile fi if ! grep -q 'rbenv' ~/.zprofile then echo 'eval "$(rbenv init -)"' >> ~/.zprofile fi eval "$(rbenv init -)" if ! rbenv versions | grep -q $VERSION then rbenv install $VERSION rbenv global $VERSION fi rbenv rehash # Step 5. Install NPM if [ ! -e /usr/local/bin/npm ] then echo "Installing: npm" curl https://npmjs.org/install.sh | sh else echo "Found: npm" fi if [ ! `which coffee` ] then echo "Installing: coffee" npm install -g coffee-script else echo "Found: coffee" fi if [ ! `which less` ] then echo "Installing: less" npm install -g less else echo "Found: less" fi if [ ! `which mocha` ] then echo "Installing: mocha" npm install -g mocha else echo "Found: mocha" fi # Step 6. Install POW if [ ! -d ~/.pow ] then echo "Installing: pow" curl get.pow.cx | sh else echo "Found: pow" fi # Step 7. Configure GIT echo "Configuring: git" git config --global credential.helper osxkeychain # Step 8. Install some gems... gem install bundler gem install powder