Chromium Code Reviews| Index: scripts/trim_data.sh |
| diff --git a/scripts/trim_data.sh b/scripts/trim_data.sh |
| index 46be26c88ac527ef549d81c4069df15142b92a12..a60bd46bd89faeb57554015cea7a9317da249a3f 100755 |
| --- a/scripts/trim_data.sh |
| +++ b/scripts/trim_data.sh |
| @@ -3,6 +3,7 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +set -e |
| # Remove entries currently not used in Chromium/V8. |
| function filter_locale_data { |
| @@ -184,6 +185,14 @@ function filter_unit_data { |
| /^ \}$/ p |
| d |
| }' ${i} |
| + |
| + # Delete empty units,units{Narrow|Short} block. Otherwise, locale fallback |
| + # fails. See crbug.com/707515. |
| + sed -r -i \ |
| + '/^ units(|Narrow|Short)\{$/ { |
| + N |
| + /^ units(|Narrow|Short)\{\n \}/ d |
|
Daniel Erat
2017/04/11 21:18:10
sorry, my sed is a bit rusty/nonexistent. i think
jungshik at Google
2017/04/11 21:53:17
unitsNarrow{
}
Given an input like the above,
|
| + }' ${i} |
| done |
| } |