Created
May 22, 2012 14:30
-
-
Save ottomata/2769415 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class misc::contint::jdk { | |
# JDK for android continuous integration | |
# extra stuff for license agreement acceptance | |
# Based off of http://offbytwo.com/2011/07/20/scripted-installation-java-ubuntu.html | |
package { "debconf-utils": | |
ensure => installed | |
} | |
exec { "agree-to-jdk-license": | |
command => "/bin/echo -e sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true | debconf-set-selections", | |
unless => "debconf-get-selections | grep 'sun-java6-jdk.*shared/accepted-sun-dlj-v1-1.*true'", | |
path => ["/bin", "/usr/bin"], require => Package["debconf-utils"], | |
} | |
exec { "agree-to-jre-license": | |
command => "/bin/echo -e sun-java6-jre shared/accepted-sun-dlj-v1-1 select true | debconf-set-selections", | |
unless => "debconf-get-selections | grep 'sun-java6-jre.*shared/accepted-sun-dlj-v1-1.*true'", | |
path => ["/bin", "/usr/bin"], require => Package["debconf-utils"], | |
} | |
package { "sun-java6-jdk": | |
ensure => latest, | |
require => [ Exec["agree-to-jdk-license"] ], | |
} | |
package { "sun-java6-jre": | |
ensure => latest, | |
require => [ Exec["agree-to-jre-license"] ], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment