OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # Installs required build dependencies (to buildtools/ and the local system). | 6 # Installs required build dependencies (to buildtools/ and the local system). |
7 | 7 |
8 CHROME_MIN_VERSION=32 | 8 CHROME_MIN_VERSION=49 |
9 | 9 |
10 ( | 10 ( |
11 set -e | 11 set -e |
12 if [ "$(id -u)" != "0" ]; then | 12 if [ "$(id -u)" != "0" ]; then |
13 echo "Please run this as root." | 13 echo "Please run this as root." |
14 exit 1 | 14 exit 1 |
15 fi | 15 fi |
16 | 16 |
17 apt-get update | 17 apt-get update |
18 apt-get install \ | 18 apt-get install -y \ |
19 ant \ | 19 ant \ |
20 openjdk-7-jdk \ | 20 openjdk-7-jdk \ |
21 protobuf-compiler \ | 21 protobuf-compiler \ |
22 python \ | 22 python \ |
23 python-setuptools \ | 23 python-setuptools \ |
24 python-protobuf \ | 24 python-protobuf \ |
25 unzip \ | 25 unzip \ |
26 wget \ | 26 wget \ |
27 xvfb | 27 xvfb |
28 | 28 |
29 if ! command -v google-chrome >/dev/null 2>&1; then | 29 if ! command -v google-chrome >/dev/null 2>&1; then |
30 wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
add - | 30 wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
add - |
31 echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/so
urces.list.d/google-chrome.list | 31 echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >
> /etc/apt/sources.list.d/google-chrome.list |
32 apt-get update | 32 apt-get update |
33 apt-get install google-chrome-stable | 33 apt-get install google-chrome-stable |
34 fi | 34 fi |
35 | 35 |
36 # Update chrome if it is too old, and keep the default channel. | 36 # Update chrome if it is too old, and keep the default channel. |
37 if ! google-chrome --version | tr " " "\n" | awk '/[0-9.]/{exit ($1<'${CHROME_
MIN_VERSION}')}'; then | 37 if ! google-chrome --version | tr " " "\n" | awk '/[0-9.]/{exit ($1<'${CHROME_
MIN_VERSION}')}'; then |
38 case "$(google-chrome --version)" in | 38 case "$(google-chrome --version)" in |
39 *dev*) | 39 *dev*) |
40 apt-get install google-chrome-unstable | 40 apt-get install google-chrome-unstable |
41 ;; | 41 ;; |
(...skipping 26 matching lines...) Expand all Loading... |
68 chmod u+x $tools/chromedriver | 68 chmod u+x $tools/chromedriver |
69 | 69 |
70 wget https://pypi.python.org/packages/source/s/selenium/$tar | 70 wget https://pypi.python.org/packages/source/s/selenium/$tar |
71 tar -xf $tar | 71 tar -xf $tar |
72 cd $pkg | 72 cd $pkg |
73 | 73 |
74 python setup.py install | 74 python setup.py install |
75 | 75 |
76 rm -rf $tmp | 76 rm -rf $tmp |
77 ) | 77 ) |
OLD | NEW |