File tree Expand file tree Collapse file tree 1 file changed +10
-24
lines changed Expand file tree Collapse file tree 1 file changed +10
-24
lines changed Original file line number Diff line number Diff line change 11#
22# Author:: Nathan L Smith ([email protected] ) 3+ # Author:: Marius Ducea ([email protected] ) 34# Cookbook Name:: nodejs
45# Recipe:: package
56#
67# Copyright 2012, Cramer Development, Inc.
8+ # Copyright 2013, Opscale
79#
810# Licensed under the Apache License, Version 2.0 (the "License");
911# you may not use this file except in compliance with the License.
1921#
2022
2123case node [ 'platform_family' ]
22- when 'rhel' , 'fedora'
23- file = '/usr/local/src/nodejs-stable-release.noarch.rpm'
24-
25- remote_file file do
26- source 'http://nodejs.tchol.org/repocfg/el/nodejs-stable-release.noarch.rpm'
27- action :create_if_missing
28- end
29-
30- yum_package 'nodejs-stable-release' do
31- source file
32- options '--nogpgcheck'
33- end
34-
35- %w{ nodejs nodejs-compat-symlinks npm } . each do |pkg |
36- package pkg
37- end
3824 when 'debian'
3925 apt_repository 'node.js' do
4026 uri 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu'
4430 key "C7917B12"
4531 action :add
4632 end
47-
48- %w{ nodejs npm } . each do |pkg |
49- package pkg
50- end
33+ packages = %w{ nodejs npm }
5134 when 'smartos'
52- %w{ nodejs } . each do |pkg |
53- package pkg
54- end
35+ packages = %w{ nodejs }
5536 else
56- include_recipe "nodejs::install_from_source"
37+ Chef ::Log . error "There are no nodejs packages for this platform; please use the source or binary method to install node"
38+ return
39+ end
40+
41+ packages . each do |node_pkg |
42+ package node_pkg
5743end
You can’t perform that action at this time.
0 commit comments