Skip to content

Instantly share code, notes, and snippets.

@imtapps
Created March 4, 2014 15:21
Show Gist options
  • Save imtapps/9348388 to your computer and use it in GitHub Desktop.
Save imtapps/9348388 to your computer and use it in GitHub Desktop.
node_installed = `which npm`
if node_installed.empty?
execute "cd ~ && wget 'http://nodejs.org/dist/v0.10.25/node-v0.10.25-linux-x64.tar.gz'"
execute "cd ~ && tar xvzf node-v0.10.25-linux-x64.tar.gz"
execute "cd ~ && mv node-v0.10.25-linux-x64 nodejs"
execute "cd /usr/bin/ && ln -s ~/nodejs/bin/node /usr/bin/node"
execute "cd /usr/bin/ && ln -s ~/nodejs/bin/npm /usr/bin/npm"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment