github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/builtin/scriptpack/java/data/install.sh (about) 1 # java_install_prepare installs the things necessary for any Java installs 2 java_install_prepare() { 3 # Obvious: we're running non-interactive mode 4 export DEBIAN_FRONTEND=noninteractive 5 6 # Update apt once 7 apt_update_once 8 9 # Our PPAs have unicode characters, so we need to set the proper lang. 10 otto_init_locale 11 12 # Install stuff we need 13 oe sudo apt-get install -y python-software-properties software-properties-common apt-transport-https 14 } 15 16 # java_install_8 installs Java 8 17 java_install_8() { 18 oe sudo add-apt-repository ppa:webupd8team/java -y 19 apt_update 20 21 # Accept the Oracle license agreement 22 echo debconf shared/accepted-oracle-license-v1-1 select true | oe sudo debconf-set-selections 23 24 # Install Java 25 apt_install oracle-java8-installer oracle-java8-set-default 26 } 27 28 # java_gradle_install installs the specified Gradle version. 29 java_gradle_install() { 30 local version="$1" 31 32 oe sudo add-apt-repository ppa:cwchien/gradle -y 33 apt_update 34 apt_install "gradle-${version}" 35 } 36 37 # java_maven_install installs Maven. Eventually this will take an argument. 38 java_maven_install() { 39 apt_install maven 40 }