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 that | 7 # Script to install everything needed to build chromium on android that |
8 # requires sudo privileges. | 8 # requires sudo privileges. |
9 # See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions | 9 # See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 then | 87 then |
88 # If there are non-javaplugin.so errors, treat as errors and exit | 88 # If there are non-javaplugin.so errors, treat as errors and exit |
89 echo 'ERRORS: Failed to update alternatives for java-6-sun:' | 89 echo 'ERRORS: Failed to update alternatives for java-6-sun:' |
90 grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out | 90 grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out |
91 exit 1 | 91 exit 1 |
92 fi | 92 fi |
93 fi | 93 fi |
94 | 94 |
95 if test "$skip_inst_sdk_packages" != 1; then | 95 if test "$skip_inst_sdk_packages" != 1; then |
96 echo 'checking for sdk packages install' | 96 echo 'checking for sdk packages install' |
97 # Get the SDK extras packages to install from the DEPS file 'sdkextras' hook. | |
98 packages="$(python -c 'execfile("./get_sdk_extras_packages.py")')" | |
99 # Use absolute path to call 'android' so script can be run from any directory. | 97 # Use absolute path to call 'android' so script can be run from any directory. |
100 cwd=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | 98 cwd=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 99 # Get the SDK extras packages to install from the DEPS file 'sdkextras' hook. |
| 100 packages="$(python ${cwd}/get_sdk_extras_packages.py)" |
101 for package in "${packages}"; do | 101 for package in "${packages}"; do |
102 pkg_id=$(${cwd}/../third_party/android_tools/sdk/tools/android list sdk | \ | 102 pkg_id=$(${cwd}/../third_party/android_tools/sdk/tools/android list sdk | \ |
103 grep -i "$package," | \ | 103 grep -i "$package," | \ |
104 awk '/^[ ]*[0-9]*- / {gsub("-",""); print $1}') | 104 awk '/^[ ]*[0-9]*- / {gsub("-",""); print $1}') |
105 if [[ -n ${pkg_id} ]]; then | 105 if [[ -n ${pkg_id} ]]; then |
106 ${cwd}/../third_party/android_tools/sdk/tools/android update sdk --no-ui \ | 106 ${cwd}/../third_party/android_tools/sdk/tools/android update sdk --no-ui \ |
107 --filter ${pkg_id} | 107 --filter ${pkg_id} |
108 fi | 108 fi |
109 done | 109 done |
110 fi | 110 fi |
111 | 111 |
112 echo "install-build-deps-android.sh complete." | 112 echo "install-build-deps-android.sh complete." |
OLD | NEW |