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 20 matching lines...) Expand all Loading... |
31 rm -rf "${TEMPDIR}" | 31 rm -rf "${TEMPDIR}" |
32 exit ${status} | 32 exit ${status} |
33 } | 33 } |
34 trap cleanup EXIT | 34 trap cleanup EXIT |
35 | 35 |
36 sudo apt-get update | 36 sudo apt-get update |
37 | 37 |
38 # Fix deps | 38 # Fix deps |
39 sudo apt-get -f install | 39 sudo apt-get -f install |
40 | 40 |
41 # Install python-pexpect | 41 # Install deps |
42 sudo apt-get install python-pexpect | 42 sudo apt-get -y install python-pexpect ant1.8 xvfb x11-utils |
43 | 43 |
44 # Install sun-java6 stuff | 44 # Install sun-java6 stuff |
45 sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk | 45 sudo apt-get -y install sun-java6-bin sun-java6-jre sun-java6-jdk |
46 | 46 |
47 # Switch version of Java to java-6-sun | 47 # Switch version of Java to java-6-sun |
48 # Sun's java is missing certain Java plugins (e.g. for firefox, mozilla). These | 48 # Sun's java is missing certain Java plugins (e.g. for firefox, mozilla). These |
49 # are not required to build, and thus are treated only as warnings. Any errors | 49 # are not required to build, and thus are treated only as warnings. Any errors |
50 # in updating java alternatives which are not '*-javaplugin.so' will cause | 50 # in updating java alternatives which are not '*-javaplugin.so' will cause |
51 # errors and stop the script from completing successfully. | 51 # errors and stop the script from completing successfully. |
52 if ! sudo update-java-alternatives -s java-6-sun \ | 52 if ! sudo update-java-alternatives -s java-6-sun \ |
53 >& "${TEMPDIR}"/update-java-alternatives.out | 53 >& "${TEMPDIR}"/update-java-alternatives.out |
54 then | 54 then |
55 # Check that there are the expected javaplugin.so errors for the update | 55 # Check that there are the expected javaplugin.so errors for the update |
56 if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& /dev/null | 56 if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& /dev/null |
57 then | 57 then |
58 # Print as warnings all the javaplugin.so errors | 58 # Print as warnings all the javaplugin.so errors |
59 echo 'WARNING: java-6-sun has no alternatives for the following plugins:' | 59 echo 'WARNING: java-6-sun has no alternatives for the following plugins:' |
60 grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out | 60 grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out |
61 fi | 61 fi |
62 # Check if there are any errors that are not javaplugin.so | 62 # Check if there are any errors that are not javaplugin.so |
63 if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \ | 63 if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \ |
64 >& /dev/null | 64 >& /dev/null |
65 then | 65 then |
66 # If there are non-javaplugin.so errors, treat as errors and exit | 66 # If there are non-javaplugin.so errors, treat as errors and exit |
67 echo 'ERRORS: Failed to update alternatives for java-6-sun:' | 67 echo 'ERRORS: Failed to update alternatives for java-6-sun:' |
68 grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out | 68 grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out |
69 exit 1 | 69 exit 1 |
70 fi | 70 fi |
71 fi | 71 fi |
72 | 72 |
73 # Install ant 1.8 (default is 1.7). | |
74 sudo apt-get install ant1.8 | |
75 | |
76 echo "install-build-deps-android.sh complete." | 73 echo "install-build-deps-android.sh complete." |
OLD | NEW |