Last active
February 3, 2016 01:59
-
-
Save ksafranski/b821979456610f3a145a to your computer and use it in GitHub Desktop.
Environement Setup
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 | |
# Run update | |
apt-get update | |
wait | |
# Install build-essentials | |
apt-get --yes --force-yes install build-essential | |
wait | |
# Install git | |
apt-get --yes --force-yes install git | |
wait | |
# Install NVM | |
git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags` | |
source ~/.nvm/nvm.sh | |
wait | |
nvm install 0.10.26 | |
wait | |
nvm alias default 0.10.26 | |
# Install ZSH | |
apt-get --yes --force-yes install zsh | |
wait | |
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh | |
wait | |
chsh -s `which zsh` | |
# Change to better oh-my-zsh theme | |
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="avit"/g' ~/.zshrc | |
# Set NVM to start automatically | |
echo "source ~/.nvm/nvm.sh && nvm use default" >> ~/.zshrc | |
# If "ide" is passed in arguments + username and password (ex: ./script.sh ide foo bar) | |
if [ $1 = "ide" ]; then | |
# Create workspace | |
mkdir ~/workspace | |
# Install forever | |
npm install forever -g | |
wait | |
# Clone C9 Core | |
git clone https://github.com/Fluidbyte/core.git ~/c9 | |
wait | |
# Run setup | |
source ~/c9/scripts/install-sdk.sh | |
wait | |
exit | |
# Start C9 automatically | |
echo "forever start ~/c9/server.js -p 8181 -l 0.0.0.0 --auth $2:$3 -w ~/workspace" >> ~/.zshrc | |
fi | |
# Restart | |
shutdown -r 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment