Chromium Code Reviews| Index: third_party/closure_compiler/bump_compiler_version |
| diff --git a/third_party/closure_compiler/bump_compiler_version b/third_party/closure_compiler/bump_compiler_version |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..7fc8e194146c9fb009aa6006596e9a2fc8d823c8 |
| --- /dev/null |
| +++ b/third_party/closure_compiler/bump_compiler_version |
| @@ -0,0 +1,36 @@ |
| +#!/bin/bash |
| +# Copyright 2014 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| +# |
| +# Download the newest version of Closure Compiler, build it and put into Chrome |
| +# source tree. Also update externs/chrome_extensions.js. |
| + |
| +readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
| +readonly TEMP_DIR=$(mktemp -d) |
| + |
| +cleanup() { |
| + rm -rf "${TEMP_DIR}" |
| +} |
| + |
| +trap cleanup SIGINT SIGHUP SIGTERM |
| + |
| +cd "${TEMP_DIR}" |
| +echo "Cloning Closure Compiler repo" |
| +git clone https://github.com/google/closure-compiler.git |
| + |
| +cd closure-compiler |
| +echo "Building Closure Compiler" |
| +ant jar |
| + |
| +if [[ "$?" -ne 0 ]]; then |
| + echo "Failed to build jar, copy nothing" >&2 |
|
Dan Beam
2014/09/19 01:02:39
copy nothing => copying nothing OR nothing to copy
Vitaly Pavlenko
2014/09/19 01:32:22
Done.
|
| + cleanup |
| + exit 1 |
| +fi |
| + |
| +echo "Copying compiler.jar and chrome_extensions.js" |
| +cp build/compiler.jar "${SCRIPT_DIR}/compiler/" |
| +cp contrib/externs/chrome_extensions.js "${SCRIPT_DIR}/externs/" |
| +echo "Done" |
| +cleanup |