OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 # |
| 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 # |
| 7 |
| 8 # Clones the dom-distiller repo, compiles and extracts its javascript Then |
| 9 # copies that js into the Chromium tree. |
| 10 # This script should be run from the src/ directory and requires that ant is |
| 11 # installed. |
| 12 |
| 13 ( |
| 14 dom_distiller_js_path=third_party/dom_distiller_js |
| 15 compiled_js_path=$dom_distiller_js_path/js/domdistiller.js |
| 16 tmpdir=/tmp/domdistiller-$$ |
| 17 |
| 18 rm -rf $tmpdir |
| 19 mkdir $tmpdir |
| 20 |
| 21 pushd $tmpdir |
| 22 git clone https://code.google.com/p/dom-distiller/ . |
| 23 ant extractjs |
| 24 gitsha=$(git rev-parse HEAD | head -c 10) |
| 25 popd |
| 26 |
| 27 mkdir -p $(dirname $compiled_js_path) |
| 28 cp $tmpdir/out/domdistiller.js $compiled_js_path |
| 29 cp $tmpdir/LICENSE $dom_distiller_js_path/ |
| 30 sed -i "s/Version: [0-9a-f]*/Version: $gitsha/" $dom_distiller_js_path/README.
chromium |
| 31 |
| 32 rm -rf $tmpdir |
| 33 ) |
OLD | NEW |