install-build-deps-android.sh support for Ubuntu Xenial

R=dpranke@chromium.org,pgervais@google.com
BUG=601197

Review-Url: https://codereview.chromium.org/1924093002
Cr-Original-Commit-Position: refs/heads/master@{#390255}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3f67f4af2bb655ce6de7dea2b05210145b682f45
This commit is contained in:
friedman 2016-04-27 17:32:26 -07:00 коммит произвёл Commit bot
Родитель fbe0d1c671
Коммит df9178df76
1 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -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