| 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 # Download the newest version of Closure Compiler, build it and put into Chrome | 6 # Download the newest version of Closure Compiler, build it and put into Chrome |
| 7 # source tree. Also update externs/chrome_extensions.js. | 7 # source tree. Also update externs/chrome_extensions.js. |
| 8 | 8 |
| 9 java -version 2>&1 | head -1 | egrep -q '\b1\.7' |
| 10 if [[ $? -ne 0 ]]; then |
| 11 echo "This script requires Java 1.7" >&2 |
| 12 exit 1 |
| 13 fi |
| 14 |
| 15 javac -version 2>&1 | egrep -q '\b1\.7' |
| 16 if [[ $? -ne 0 ]]; then |
| 17 echo "This script requires JDK 1.7" >&2 |
| 18 exit 1 |
| 19 fi |
| 20 |
| 9 readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | 21 readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
| 10 readonly TEMP_DIR=$(mktemp -d) | 22 readonly TEMP_DIR=$(mktemp -d) |
| 11 readonly EXTERNS_DIR="${SCRIPT_DIR}/externs" | 23 readonly EXTERNS_DIR="${SCRIPT_DIR}/externs" |
| 12 readonly README="${SCRIPT_DIR}/README.chromium" | 24 readonly README="${SCRIPT_DIR}/README.chromium" |
| 13 | 25 |
| 14 cleanup() { | 26 cleanup() { |
| 15 rm -rf "${TEMP_DIR}" | 27 rm -rf "${TEMP_DIR}" |
| 16 } | 28 } |
| 17 | 29 |
| 18 get_sha1() { | 30 get_sha1() { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 echo "${head_range}" | 141 echo "${head_range}" |
| 130 if [[ ! -z "${extensions_range}" ]]; then echo "${extensions_range}"; fi | 142 if [[ ! -z "${extensions_range}" ]]; then echo "${extensions_range}"; fi |
| 131 if [[ ! -z "${polymer_range}" ]]; then echo "${polymer_range}"; fi | 143 if [[ ! -z "${polymer_range}" ]]; then echo "${polymer_range}"; fi |
| 132 echo | 144 echo |
| 133 echo "TBR=" | 145 echo "TBR=" |
| 134 echo "BUG='" | 146 echo "BUG='" |
| 135 echo | 147 echo |
| 136 echo "git cl upload" | 148 echo "git cl upload" |
| 137 | 149 |
| 138 cleanup | 150 cleanup |
| OLD | NEW |