Skip to content

Instantly share code, notes, and snippets.

@ashking
Created August 25, 2013 13:11
Show Gist options
  • Save ashking/6333792 to your computer and use it in GitHub Desktop.
Save ashking/6333792 to your computer and use it in GitHub Desktop.
Install Cloud9 IDE locally on you machine in easy steps
#!/bin/sh
#######################################################################################
# _______ _ _______ ______ _____ _________ ______ _______ #
# ( ____ \( \ ( ___ )|\ /|( __ \ / ___ \ \__ __/( __ \ ( ____ \ #
# | ( \/| ( | ( ) || ) ( || ( \ )( ( ) ) ) ( | ( \ )| ( \/ #
# | | | | | | | || | | || | ) |( (___) | | | | | ) || (__ #
# | | | | | | | || | | || | | | \____ | | | | | | || __) #
# | | | | | | | || | | || | ) | ) | | | | | ) || ( #
# | (____/\| (____/\| (___) || (___) || (__/ )/\____) ) ___) (___| (__/ )| (____/\ #
# (_______/(_______/(_______)(_______)(______/ \______/ \_______/(______/ (_______/ #
# #
#######################################################################################
detect_package_manager;
#Step 1: Update system for latest packages
$package_manager -y update
#Step 2: Install dependencies
$package_manager -y install libssl-dev git-core pkg-config pkgconfig build-essential curl gcc g++ libxml2-dev
#Step 3: Install nvm (Node version manager) and node v0.6.19
git clone git://github.com/creationix/nvm.git ~/.nvm
echo '. ~/.nvm/nvm.sh' >> ~/.bashrc && . ~/.bashrc
nvm install v0.6.19
nvm use v0.6.19
#Step 4: Clone CLoud9 repo
git clone git://github.com/ashwin-kumar/Cloud9.git ~/.cloud9
#Step 5: Add alias to .bashrc
echo 'alias cloud9=~/.nvm/v0.6.19/bin/node ~/.cloud9/server.js -w' >> ~/.bashrc && . ~/.bashrc
#Step 6: Install, if any, missing node modules
`cd ~/.cloud9 && npm install`
function detect_package_manager {
if [ $((`which yum | wc -l`)) -gt 0 ]; then
package_manager="yum"
else
package_manager="apt-get"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment