Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/bash | |
| 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 | |
| 4 # found in the LICENSE file. | |
| 5 # | |
| 6 # Download the newest version of Closure Compiler, build it and put into Chrome | |
| 7 # source tree. Also update externs/chrome_extensions.js. | |
| 8 # | |
| 9 # How to update compiler version in Chrome source: | |
| 10 # a) Run this script. | |
| 11 # b) Add third_party/closure_compiler/compiler/compiler.jar and | |
| 12 # third_party/closure_compiler/externs/chrome_extensions.js | |
| 13 # c) Commit. | |
| 14 | |
| 15 readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
|
Dan Beam
2014/09/18 21:26:07
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURC
Vitaly Pavlenko
2014/09/18 21:49:43
Done.
| |
| 16 readonly TEMP_DIR=$(mktemp -d) | |
| 17 | |
| 18 cd "${TEMP_DIR}" | |
| 19 echo "Cloning Closure Compiler repo" | |
| 20 git clone https://github.com/google/closure-compiler.git | |
| 21 | |
| 22 cd closure-compiler | |
| 23 echo "Building Closure Compiler" | |
| 24 ant jar | |
| 25 | |
| 26 if [[ -e build/compiler.jar ]] ; then | |
| 27 echo "Copying compiler.jar and chrome_extensions.js" | |
| 28 cp build/compiler.jar "${SCRIPT_DIR}/compiler/" | |
| 29 cp contrib/externs/chrome_extensions.js "${SCRIPT_DIR}/externs/" | |
| 30 echo "Done" | |
| 31 else | |
| 32 echo "Failed to build jar, copy nothing" | |
|
Dan Beam
2014/09/18 21:26:08
we need to exit with non-zero exit status somehow
Vitaly Pavlenko
2014/09/18 21:49:43
Done.
| |
| 33 fi | |
| 34 | |
| 35 rm -rf "${TEMP_DIR}" | |
| OLD | NEW |