Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[source] compile with all processors when known. Default:2

  • Loading branch information...
commit 3dd7eaec75a6cc96176489dc77b02126b3f8a0a2 1 parent 9e39a20
Chris Lundquist authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 recipes/install_from_source.rb
View
4 recipes/install_from_source.rb
@@ -50,11 +50,13 @@
end
bash "compile node.js" do
+ # OSX doesn't have the attribute so arbitrarily default 2
+ make_threads = node['cpu'] ? node['cpu']['total'].to_i : 2
cwd "/usr/local/src/node-v#{node['nodejs']['version']}"
code <<-EOH
PATH="/usr/local/bin:$PATH"
./configure --prefix=#{node['nodejs']['dir']} && \
- make
+ make -j #{make_threads}
EOH
creates "/usr/local/src/node-v#{node['nodejs']['version']}/node"
end
Please sign in to comment.
Something went wrong with that request. Please try again.