Created
June 6, 2016 15:45
-
-
Save Neener54/39cb750b807ce2d6eeb8a363bb0f43ea to your computer and use it in GitHub Desktop.
Setup Script for Nav Projects
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
#!/usr/bin/env bash | |
NODE_VERSION=4.4.4 | |
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 | |
echo "Checking NVM" | |
which -s nvm | curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment