Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1049)

Unified Diff: build/install-build-deps-android.sh

Issue 1924093002: install-build-deps-android.sh support for Ubuntu Xenial (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/pkgs/java_pkgs/ Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..172279b2ecc4bb457517874b137a8999acfb0f2a 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"
+ java_pkgs="openjdk-8-jre openjdk-8-jdk"
+ ;;
+ *)
+ java_alternative="java-1.7.0-openjdk-amd64"
+ java_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 $java_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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698