Created
June 24, 2009 01:13
-
-
Save nz/134943 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# Install and configure Ruby Enterprise Edition | |
## | |
# TODO: Replace kludgy shell tests with not_if | |
# TODO: Use better resources than bash scripts (i.e., remote_file) | |
version = "1.8.6-20090610" # TODO: move to an attribute file | |
package "libreadline5-dev" | |
bash "install ruby enterprise" do | |
code [ | |
"test -d /opt/ruby-enterprise-#{version} && exit 0", | |
"cd /tmp/ruby-enterprise-#{version}", | |
'echo -en "\n\n\n" | ./installer', | |
"(for i in /opt/ruby-enterprise-#{version}/bin/*; do echo ln -sf $i /usr/bin/; done)" | |
].join("\n") | |
# TODO: not_if "test -d /opt/ruby-enterprise-#{version}" | |
action :nothing # triggered by the download, below | |
end | |
bash "download ruby enterprise" do | |
code %( | |
(test -d /tmp/ruby-enterprise-#{version} && exit 0) | |
(cd /tmp; wget -cq http://www.rubyenterpriseedition.com/ruby-enterprise-#{version}.tar.gz) | |
(cd /tmp; tar zxf ruby-enterprise-#{version}.tar.gz) | |
) | |
# TODO: not_if "test -d /opt/ruby-enterprise-#{version}" | |
notifies :run, resources(:bash => "install ruby enterprise"), :immediately | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment