| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 dirs=$(find components-chromium -type d | grep -v 'components-chromium/polymer') | 6 dirs=$(find components-chromium -type d | grep -v 'components-chromium/polymer') |
| 7 | 7 |
| 8 for dir in $dirs; do | 8 for dir in $dirs; do |
| 9 htmls=$(\ls $dir/*.html 2>/dev/null) | 9 htmls=$(\ls $dir/*.html 2>/dev/null) |
| 10 if [ "$htmls" ]; then | 10 if [ "$htmls" ]; then |
| 11 echo "Creating $dir/compiled_resources2.gyp" | 11 echo "Analyzing $dir" |
| 12 ../../../tools/polymer/generate_compiled_resources_gyp.py $htmls > \ | 12 gyp_file="$dir/compiled_resources2.gyp" |
| 13 "$dir/compiled_resources2.gyp" | 13 content=$(../../../tools/polymer/generate_compiled_resources_gyp.py $htmls) |
| 14 if [ "$content" ]; then |
| 15 echo "Writing $gyp_file" |
| 16 echo "$content" > "$gyp_file" |
| 17 elif [ -f "$gyp_file" ]; then |
| 18 echo "Removing $gyp_file" |
| 19 rm "$gyp_file" |
| 20 fi |
| 21 echo |
| 14 fi | 22 fi |
| 15 done | 23 done |
| OLD | NEW |