Index: third_party/dom_distiller_js/update_domdistiller_js.sh |
diff --git a/third_party/dom_distiller_js/update_domdistiller_js.sh b/third_party/dom_distiller_js/update_domdistiller_js.sh |
index c1f7068d342e37c627e72b3b1121577f3bb9ffd1..0c6ca37884a9eee6cb7861f119eac1038989227f 100755 |
--- a/third_party/dom_distiller_js/update_domdistiller_js.sh |
+++ b/third_party/dom_distiller_js/update_domdistiller_js.sh |
@@ -12,7 +12,7 @@ |
( |
dom_distiller_js_path=third_party/dom_distiller_js |
- compiled_js_path=$dom_distiller_js_path/js/domdistiller.js |
+ dom_distiller_js_package=$dom_distiller_js_path/package |
readme_chromium=$dom_distiller_js_path/README.chromium |
tmpdir=/tmp/domdistiller-$$ |
changes=/tmp/domdistiller.changes |
@@ -23,19 +23,24 @@ |
pushd $tmpdir |
git clone https://code.google.com/p/dom-distiller/ . |
- ant extractjs |
new_gitsha=$(git rev-parse --short=10 HEAD) |
git log --oneline ${curr_gitsha}.. > $changes |
+ ant package |
popd |
- mkdir -p $(dirname $compiled_js_path) |
- cp $tmpdir/out/domdistiller.js $compiled_js_path |
+ rm -rf $dom_distiller_js_package |
+ mkdir $dom_distiller_js_package |
+ cp -rf $tmpdir/out/package/* $dom_distiller_js_package |
cp $tmpdir/LICENSE $dom_distiller_js_path/ |
sed -i "s/Version: [0-9a-f]*/Version: $new_gitsha/" $readme_chromium |
echo "Picked up changes:" |
cat $changes |
+ # Run checklicenses.py on the pulled files, but only print the output on |
+ # failures. |
+ tools/checklicenses/checklicenses.py $dom_distiller_js_path > $tmpdir/checklicenses.out || cat $tmpdir/checklicenses.out |
+ |
rm -rf $tmpdir |
rm $changes |
) |