Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: android/patch_locale.sh

Issue 1624643003: ICU 56 step 2: Make the tree ready for local modifications (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561upstream
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scripts/trim_data.sh » ('j') | scripts/trim_data.sh » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 treeroot="$(dirname "$0")/.."
7 cd "${treeroot}"
8
9 echo "Applying brkitr.patch"
10 patch -p1 < android/brkitr.patch || { echo "failed to patch"; exit 1; }
Mark Mentovai 2016/01/28 14:17:51 Use stderr to your advantage: { echo "failed to pa
jungshik at Google 2016/01/29 08:14:28 You meant '>&2', didn't you? I was not thinking wh
11
6 # Keep only the currencies used by the larget 60 economies in terms of GDP 12 # Keep only the currencies used by the larget 60 economies in terms of GDP
7 # with several more added in. 13 # with several more added in.
8 # TODO(jshin): Use ucurr_isAvailable in ICU to drop more currencies. 14 # TODO(jshin): Use ucurr_isAvailable in ICU to drop more currencies.
9 # See also http://en.wikipedia.org/wiki/List_of_circulating_currencies 15 # See also http://en.wikipedia.org/wiki/List_of_circulating_currencies
10 # Copied from scripts/trim_data.sh. Need to refactor. 16 # Copied from scripts/trim_data.sh. Need to refactor.
11 for currency in $(grep -v '^#' currencies.list) 17 for currency in $(grep -v '^#' "${treeroot}/android/currencies.list")
12 do 18 do
13 OP=${KEEPLIST:+|} 19 OP=${KEEPLIST:+|}
14 KEEPLIST=${KEEPLIST}${OP}${currency} 20 KEEPLIST=${KEEPLIST}${OP}${currency}
15 done 21 done
16 KEEPLIST="(${KEEPLIST})" 22 KEEPLIST="(${KEEPLIST})"
17 23
18 cd "$(dirname "$0")/.."
19
20 echo "Applying brkitr.patch"
21 patch -p1 < android/brkitr.patch || { echo "failed to patch"; exit 1; }
22
23 cd source/data 24 cd source/data
24 25
25 for i in curr/*.txt 26 for i in curr/*.txt
26 do 27 do
27 locale=$(basename $i .txt) 28 locale=$(basename $i .txt)
28 [ $locale == 'supplementalData' ] && continue; 29 [ $locale == 'supplementalData' ] && continue;
29 echo "Overwriting $i for $locale" 30 echo "Overwriting $i for $locale"
30 sed -n -r -i \ 31 sed -n -r -i \
31 '1, /^'${locale}'\{$/ p 32 '1, /^'${locale}'\{$/ p
32 /^ "%%ALIAS"\{/p 33 /^ "%%ALIAS"\{/p
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 echo Overwriting $i... 179 echo Overwriting $i...
179 sed -r '/^ calendar\{$/,/^ \}$/ { 180 sed -r '/^ calendar\{$/,/^ \}$/ {
180 /^ calendar\{$/p 181 /^ calendar\{$/p
181 /^ '${CAL_PATTERN}'\{$/, /^ \}$/p 182 /^ '${CAL_PATTERN}'\{$/, /^ \}$/p
182 /^ \}$/p 183 /^ \}$/p
183 d 184 d
184 }' -i $i 185 }' -i $i
185 done 186 done
186 187
187 echo DONE. 188 echo DONE.
OLDNEW
« no previous file with comments | « no previous file | scripts/trim_data.sh » ('j') | scripts/trim_data.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698