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

Side by Side Diff: build/install-build-deps-android.sh

Issue 10963014: Fix android build deps to work on ubuntu 12.04+ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
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 deps 41 # Install deps
42 sudo apt-get -y install python-pexpect ant1.8 xvfb x11-utils 42 # This step differs depending on what Ubuntu release we are running
43 # on since the package names are different, and Sun's Java must
44 # be installed manually on late-model versions.
43 45
44 # Install sun-java6 stuff 46 if /usr/bin/lsb_release -r -s | egrep -q "12."; then
Peter Beverloo 2012/09/21 20:01:46 There's no regular expression in here, so we can u
45 sudo apt-get -y install sun-java6-bin sun-java6-jre sun-java6-jdk 47 # Ubuntu 12.x
48 sudo apt-get -y install python-pexpect ant xvfb x11-utils
Peter Beverloo 2012/09/21 20:01:46 The python-pexpect, xvfb and x11-utils packages ar
46 49
47 # Switch version of Java to java-6-sun 50 # Java can not be installed via ppa on Ubuntu 12.04+ so we'll
48 # Sun's java is missing certain Java plugins (e.g. for firefox, mozilla). These 51 # simply check to see if it has been setup properly -- if not
49 # are not required to build, and thus are treated only as warnings. Any errors 52 # let the user know.
50 # in updating java alternatives which are not '*-javaplugin.so' will cause 53
51 # errors and stop the script from completing successfully. 54 if ! java -version 2>&1 | egrep -q "Java\(TM\)"; then
Peter Beverloo 2012/09/21 20:01:46 This can be "grep" as well, then you don't have to
52 if ! sudo update-java-alternatives -s java-6-sun \ 55 echo "****************************************************************"
53 >& "${TEMPDIR}"/update-java-alternatives.out 56 echo "You need to install the Oracle Java SDK from http://goo.gl/uPRSq"
54 then 57 echo "and configure it as the default command-line Java environment."
55 # Check that there are the expected javaplugin.so errors for the update 58 echo "****************************************************************"
56 if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& /dev/null 59 exit
60 fi
61
62 else
63 # Ubuntu 10.x
64
65 sudo apt-get -y install python-pexpect ant1.8 xvfb x11-utils
66
67 # Install sun-java6 stuff
68 sudo apt-get -y install sun-java6-bin sun-java6-jre sun-java6-jdk
69
70 # Switch version of Java to java-6-sun
71 # Sun's java is missing certain Java plugins (e.g. for firefox, mozilla).
72 # These are not required to build, and thus are treated only as warnings.
73 # Any errors in updating java alternatives which are not '*-javaplugin.so'
74 # will cause errors and stop the script from completing successfully.
75 if ! sudo update-java-alternatives -s java-6-sun \
76 >& "${TEMPDIR}"/update-java-alternatives.out
57 then 77 then
58 # Print as warnings all the javaplugin.so errors 78 # Check that there are the expected javaplugin.so errors for the update
59 echo 'WARNING: java-6-sun has no alternatives for the following plugins:' 79 if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& \
60 grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out 80 /dev/null
61 fi 81 then
62 # Check if there are any errors that are not javaplugin.so 82 # Print as warnings all the javaplugin.so errors
63 if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \ 83 echo 'WARNING: java-6-sun has no alternatives for the following plugins:'
64 >& /dev/null 84 grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
65 then 85 fi
66 # If there are non-javaplugin.so errors, treat as errors and exit 86 # Check if there are any errors that are not javaplugin.so
67 echo 'ERRORS: Failed to update alternatives for java-6-sun:' 87 if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \
68 grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out 88 >& /dev/null
69 exit 1 89 then
90 # If there are non-javaplugin.so errors, treat as errors and exit
91 echo 'ERRORS: Failed to update alternatives for java-6-sun:'
92 grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
93 exit 1
94 fi
70 fi 95 fi
71 fi 96 fi
72 97
73 echo "install-build-deps-android.sh complete." 98 echo "install-build-deps-android.sh complete."
OLDNEW
« 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