Chromium Code Reviews| Index: build/install-build-deps-android.sh |
| diff --git a/build/install-build-deps-android.sh b/build/install-build-deps-android.sh |
| index 9f1317ef3b8b667e81f0cf568ad32228ff4ea78b..cda4acb3ccd6e4313d77bd4adae5f31535ad19ce 100755 |
| --- a/build/install-build-deps-android.sh |
| +++ b/build/install-build-deps-android.sh |
| @@ -19,12 +19,23 @@ if ! uname -m | egrep -q "i686|x86_64"; then |
| exit |
| fi |
| +lsb_release=$(lsb_release --codename --short) |
| + |
| +case $lsb_release in |
| + xenial) |
| + java_alternative="java-1.8.0-openjdk-amd64" |
| + pkgs="openjdk-8-jre openjdk-8-jdk" |
|
jbudorick
2016/04/27 23:30:07
nit: name this something like "java_pkgs" or somet
friedman1
2016/04/27 23:43:10
Done.
|
| + ;; |
| + *) |
| + java_alternative="java-1.7.0-openjdk-amd64" |
| + pkgs="openjdk-7-jre openjdk-7-jdk" |
| + ;; |
| +esac |
| + |
| # Install first the default Linux build deps. |
| "$(dirname "${BASH_SOURCE[0]}")/install-build-deps.sh" \ |
| --no-syms --lib32 --no-arm --no-chromeos-fonts --no-nacl --no-prompt "${args}" |
| -lsb_release=$(lsb_release --codename --short) |
| - |
| # The temporary directory used to store output of update-java-alternatives |
| TEMPDIR=$(mktemp -d) |
| cleanup() { |
| @@ -56,15 +67,15 @@ fi |
| sudo apt-get -y install ant |
| -# Install openjdk and openjre 7 stuff |
| -sudo apt-get -y install openjdk-7-jre openjdk-7-jdk |
| +# Install openjdk and openjre stuff |
| +sudo apt-get -y install $pkgs |
| # Switch version of Java to openjdk 7. |
| # Some Java plugins (e.g. for firefox, mozilla) are not required to build, and |
| # thus are treated only as warnings. Any errors in updating java alternatives |
| # which are not '*-javaplugin.so' will cause errors and stop the script from |
| # completing successfully. |
| -if ! sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 \ |
| +if ! sudo update-java-alternatives -s $java_alternative \ |
| >& "${TEMPDIR}"/update-java-alternatives.out |
| then |
| # Check that there are the expected javaplugin.so errors for the update |