Index: tools/polymer/txt_to_polymer_grdp.sh |
diff --git a/tools/polymer/txt_to_polymer_grdp.sh b/tools/polymer/txt_to_polymer_grdp.sh |
new file mode 100755 |
index 0000000000000000000000000000000000000000..f03a548eb8a254d3e916d7346db3bd656a7408a4 |
--- /dev/null |
+++ b/tools/polymer/txt_to_polymer_grdp.sh |
@@ -0,0 +1,32 @@ |
+#!/bin/bash |
+ |
+cat - <<END_OF_INPUT |
+<?xml version="1.0" encoding="utf-8"?> |
+<!-- |
+ This file is generated. |
+ Please use 'src/tools/polymer/polymer_grdp_to_txt.sh' and |
+ 'src/tools/polymer/txt_to_polymer_grdp.sh' to modify it if possible. |
+ Usage: |
+ $ polymer_grdp_to_txt.sh polymer_resources.grdp > /tmp/list.txt |
+ $ vim /tmp/list.txt |
+ $ txt_to_polymer_grdp.sh /tmp/list.txt > polymer_resources.grdp |
+--> |
+<grit-part> |
+END_OF_INPUT |
+cat "$1" | LC_ALL=C sort -u | while read p |
michaelpg
2015/03/06 04:09:31
why not 'sort "$1"' instead of 'cat "$1" | sort'?
|
+do |
+ name="IDR_POLYMER_$(tr '[a-z/.\-]' '[A-Z___]' <<< $p)" |
+ path="../../../third_party/polymer/components-chromium/$p" |
+ echo " <structure name=\"$name\"" |
+ echo " file=\"$path\"" |
+ echo " type=\"chrome_html\" />" |
+done |
+cat - <<END_OF_INPUT |
+ <structure name="IDR_POLYMER_WEB_ANIMATIONS_JS_WEB_ANIMATIONS_NEXT_LITE_MIN_JS" |
+ file="../../../third_party/web-animations-js/sources/web-animations-next-lite.min.js" |
michaelpg
2015/03/06 04:09:31
optional: maybe put these in a separate .txt file?
|
+ type="chrome_html" /> |
+ <structure name="IDR_POLYMER_WEB_ANIMATIONS_JS_WEB_ANIMATIONS_NEXT_LITE_MIN_JS_MAP" |
+ file="../../../third_party/web-animations-js/sources/web-animations-next-lite.min.js.map" |
+ type="chrome_html" /> |
+END_OF_INPUT |
+echo "</grit-part>" |