OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Script to install everything needed to build chromium on android, including | 7 # Script to install everything needed to build chromium on android, including |
8 # items requiring sudo privileges. | 8 # items requiring sudo privileges. |
9 # See https://www.chromium.org/developers/how-tos/android-build-instructions | 9 # See https://www.chromium.org/developers/how-tos/android-build-instructions |
10 | 10 |
11 # This script installs the sun-java6 packages (bin, jre and jdk). Sun requires | 11 # This script installs the sun-java6 packages (bin, jre and jdk). Sun requires |
12 # a license agreement, so upon installation it will prompt the user. To get | 12 # a license agreement, so upon installation it will prompt the user. To get |
13 # past the curses-based dialog press TAB <ret> TAB <ret> to agree. | 13 # past the curses-based dialog press TAB <ret> TAB <ret> to agree. |
14 | 14 |
15 args="$@" | 15 args="$@" |
16 | 16 |
17 if ! uname -m | egrep -q "i686|x86_64"; then | 17 if ! uname -m | egrep -q "i686|x86_64"; then |
18 echo "Only x86 architectures are currently supported" >&2 | 18 echo "Only x86 architectures are currently supported" >&2 |
19 exit | 19 exit |
20 fi | 20 fi |
21 | 21 |
22 lsb_release=$(lsb_release --codename --short) | 22 lsb_release=$(lsb_release --codename --short) |
23 | 23 |
24 case $lsb_release in | 24 case $lsb_release in |
25 xenial) | 25 xenial|yakkety) |
26 java_alternative="java-1.8.0-openjdk-amd64" | 26 java_alternative="java-1.8.0-openjdk-amd64" |
27 java_pkgs="openjdk-8-jre openjdk-8-jdk" | 27 java_pkgs="openjdk-8-jre openjdk-8-jdk" |
28 ;; | 28 ;; |
29 *) | 29 *) |
30 java_alternative="java-1.7.0-openjdk-amd64" | 30 java_alternative="java-1.7.0-openjdk-amd64" |
31 java_pkgs="openjdk-7-jre openjdk-7-jdk" | 31 java_pkgs="openjdk-7-jre openjdk-7-jdk" |
32 ;; | 32 ;; |
33 esac | 33 esac |
34 | 34 |
35 # Install first the default Linux build deps. | 35 # Install first the default Linux build deps. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 >& /dev/null | 91 >& /dev/null |
92 then | 92 then |
93 # If there are non-javaplugin.so errors, treat as errors and exit | 93 # If there are non-javaplugin.so errors, treat as errors and exit |
94 echo 'ERRORS: Failed to update alternatives for java-6-sun:' | 94 echo 'ERRORS: Failed to update alternatives for java-6-sun:' |
95 grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out | 95 grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out |
96 exit 1 | 96 exit 1 |
97 fi | 97 fi |
98 fi | 98 fi |
99 | 99 |
100 echo "install-build-deps-android.sh complete." | 100 echo "install-build-deps-android.sh complete." |
OLD | NEW |