-
-
Save jamesgolick/137682 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
# ---------------------------------------------------------------------------------- | |
# Java installation | |
# ---------------------------------------------------------------------------------- | |
package "debconf-utils" do | |
action :install | |
end | |
# Java requires you to accept licenses by hand. We can automate this with the following script | |
bash "accept_licenses" do | |
licenses = 'sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true | |
sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true | |
sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true | |
sun-java6-jre sun-java6-jre/stopthread boolean true | |
sun-java6-jre sun-java6-jre/jcepolicy note | |
sun-java6-bin shared/present-sun-dlj-v1-1 note | |
sun-java6-jdk shared/present-sun-dlj-v1-1 note | |
sun-java6-jre shared/present-sun-dlj-v1-1 note' | |
licenses = licenses.to_a.collect { |l| l.strip }.join("\n") | |
code "echo #{licenses.inspect} | debconf-set-selections" | |
end | |
package "sun-java6-bin" do | |
name "sun-java6-bin" | |
action :install | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment