Skip to content

Instantly share code, notes, and snippets.

@benevolent0505
Created June 8, 2015 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benevolent0505/b6549f3ac13788cc6a1b to your computer and use it in GitHub Desktop.
Save benevolent0505/b6549f3ac13788cc6a1b to your computer and use it in GitHub Desktop.
execute 'install nodebrew' do
command 'curl -L git.io/nodebrew | perl - setup'
not_if 'nodebrew help'
end
execute 'add path' do
command %Q(export PATH=$HOME/.nodebrew/current/bin:$PATH)
not_if 'cat ~/.bashrc | grep nodebrew'
end
execute 'source .bashrc' do
command '. ~/.bashrc'
end
execute 'install nodejs' do
command 'nodebrew install-binary latest'
not_if 'node -v'
end
execute 'use nodejs' do
command 'nodebrew use latest'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment