Skip to content

Instantly share code, notes, and snippets.

@Neener54
Created November 29, 2016 20:11
Show Gist options
  • Save Neener54/c5d89dff90debf179edfef8c73e67e64 to your computer and use it in GitHub Desktop.
Save Neener54/c5d89dff90debf179edfef8c73e67e64 to your computer and use it in GitHub Desktop.
Nav Setup Script
#!/usr/bin/env bash
NODE_VERSION=6.2.1
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}")" && pwd)"
which -s brew
if [[ $? != 0 ]] ; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
brew update
fi
which -s git || brew install git
echo "Checking for Node version ${NODE_VERSION}"
node --version | grep ${NODE_VERSION}
if [[ $? != 0 ]] ; then
cd `brew --prefix`
$(brew versions node | grep ${NODE_VERSION} | cut -c 16- -)
brew install node
git reset HEAD `brew --repository` && git checkout -- `brew --repository`
fi
shell_session_update() { :; }
echo "Checking ruby version"
which -s rvm | gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 && curl -sSL https://get.rvm.io | bash -s stable
source "$HOME/.rvm/scripts/rvm"
rvm install ruby
rvm use ruby --default
brew cask install postgres
brew install redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment