Permalink
Browse files

Add src_url attribute to allow user to set custom location for source

  • Loading branch information...
1 parent e6302aa commit d1afa930191869cb9b8cec25afed02d14881da59 Moser, Kevin committed Nov 29, 2012
Showing with 3 additions and 1 deletion.
  1. +1 −0 attributes/default.rb
  2. +2 −1 recipes/install_from_source.rb
View
@@ -22,3 +22,4 @@
default['nodejs']['checksum'] = 'dbd42800e69644beff5c2cf11a9d4cf6dfbd644a9a36ffdd5e8c6b8db9240854'
default['nodejs']['dir'] = '/usr/local'
default['nodejs']['npm'] = '1.1.48'
+default['nodejs']['src_url'] = "http://nodejs.org/dist"
@@ -32,7 +32,8 @@
if node['nodejs']['version'].split('.')[1].to_i >= 5
nodejs_tar_path = "v#{node['nodejs']['version']}/#{nodejs_tar_path}"
end
-nodejs_src_url = "http://nodejs.org/dist/#{nodejs_tar_path}"
+# Let the user override the source url in the attributes
+nodejs_src_url = "#{node['nodejs']['src_url']}/#{nodejs_tar_path}"
remote_file "/usr/local/src/#{nodejs_tar}" do
source nodejs_src_url

0 comments on commit d1afa93

Please sign in to comment.