OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Reproduces the content of 'components' and 'components-chromium' using the | 7 # Reproduces the content of 'components' and 'components-chromium' using the |
8 # list of dependencies from 'bower.json'. Downloads needed packages and makes | 8 # list of dependencies from 'bower.json'. Downloads needed packages and makes |
9 # Chromium specific modifications. To launch the script you need 'bower', | 9 # Chromium specific modifications. To launch the script you need 'bower', |
10 # 'crisper', and 'vulcanize' installed on your system. | 10 # 'crisper', and 'vulcanize' installed on your system. |
11 | 11 |
12 # IMPORTANT NOTE: The new vulcanize must be installed from | 12 # IMPORTANT NOTE: The new vulcanize must be installed from |
13 # https://github.com/Polymer/vulcanize/releases since it isn't on npm yet. | 13 # https://github.com/Polymer/vulcanize/releases since it isn't on npm yet. |
14 | 14 |
15 set -e | 15 set -e |
16 | 16 |
17 cd "$(dirname "$0")" | 17 cd "$(dirname "$0")" |
18 | 18 |
19 rm -rf components components-chromium | 19 rm -rf components components-chromium |
| 20 rm -rf ../../web-animations-js/sources |
20 | 21 |
21 bower install | 22 bower install |
22 | 23 |
| 24 mv components/web-animations-js ../../web-animations-js/sources |
| 25 cp ../../web-animations-js/sources/COPYING ../../web-animations-js/LICENSE |
| 26 |
| 27 # Remove unused gzipped binary which causes git-cl problems. |
| 28 rm ../../web-animations-js/sources/web-animations.min.js.gz |
| 29 |
23 # These components are needed only for demos and docs. | 30 # These components are needed only for demos and docs. |
24 rm -rf components/{hydrolysis,marked,marked-element,prism,prism-element,\ | 31 rm -rf components/{hydrolysis,marked,marked-element,prism,prism-element,\ |
25 iron-component-page,iron-doc-viewer,webcomponentsjs} | 32 iron-component-page,iron-doc-viewer,webcomponentsjs} |
26 | 33 |
27 # Remove unused gzipped binary which causes git-cl problems. | |
28 rm components/web-animations-js/web-animations.min.js.gz | |
29 | |
30 # Test and demo directories aren't needed. | 34 # Test and demo directories aren't needed. |
31 rm -rf components/*/{test,demo} | 35 rm -rf components/*/{test,demo} |
32 rm -rf components/polymer/explainer | 36 rm -rf components/polymer/explainer |
33 | 37 |
| 38 # Remove promise-polyfill and components which depend on it. |
| 39 rm -rf components/promise-polyfill |
| 40 rm -rf components/iron-ajax |
| 41 rm -rf components/iron-form |
| 42 |
34 # Make checkperms.py happy. | 43 # Make checkperms.py happy. |
35 find components/*/hero.svg -type f -exec chmod -x {} \; | 44 find components/*/hero.svg -type f -exec chmod -x {} \; |
36 find components/iron-selector -type f -exec chmod -x {} \; | 45 find components/iron-selector -type f -exec chmod -x {} \; |
37 | 46 |
38 # Remove carriage returns to make CQ happy. | 47 # Remove carriage returns to make CQ happy. |
39 find components -type f \( -name \*.html -o -name \*.css -o -name \*.js\ | 48 find components -type f \( -name \*.html -o -name \*.css -o -name \*.js\ |
40 -o -name \*.md -o -name \*.sh -o -name \*.json -o -name \*.gitignore\ | 49 -o -name \*.md -o -name \*.sh -o -name \*.json -o -name \*.gitignore\ |
41 -o -name \*.bat \) -print0 | xargs -0 sed -i -e $'s/\r$//g' | 50 -o -name \*.bat \) -print0 | xargs -0 sed -i -e $'s/\r$//g' |
42 | 51 |
43 # Resolve a unicode encoding issue in dom-innerHTML.html. | 52 # Resolve a unicode encoding issue in dom-innerHTML.html. |
44 NBSP=$(python -c 'print u"\u00A0".encode("utf-8")') | 53 NBSP=$(python -c 'print u"\u00A0".encode("utf-8")') |
45 sed -i 's/['"$NBSP"']/\\u00A0/g' components/polymer/polymer-mini.html | 54 sed -i 's/['"$NBSP"']/\\u00A0/g' components/polymer/polymer-mini.html |
46 | 55 |
47 ./extract_inline_scripts.sh components components-chromium | 56 ./extract_inline_scripts.sh components components-chromium |
OLD | NEW |