2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # Usage: update-icu.sh <URL of ICU SVN with release>
9 # E.g., for ICU 52.1: update-icu.sh http://source.icu-project.org/repos/icu/icu/tags/release-52-1/
12 echo "Usage: update-icu.sh <URL of ICU SVN with release>"
16 # Ensure that $Date$ in the checked-out svn files expands timezone-agnostically,
17 # so that this script's behavior is consistent when run from any time zone.
20 icu_dir
=`dirname $0`/icu
22 # Remove intl/icu/source, then replace it with a clean export.
23 rm -rf ${icu_dir}/source
24 svn
export $1/source
/ ${icu_dir}/source
26 # remove layout, tests, and samples, but leave makefiles in place
27 find ${icu_dir}/source
/layout
-name '*Makefile.in' -prune -or -type f
-print |
xargs rm
28 find ${icu_dir}/source
/layoutex
-name '*Makefile.in' -prune -or -type f
-print |
xargs rm
29 find ${icu_dir}/source
/test -name '*Makefile.in' -prune -or -type f
-print |
xargs rm
30 find ${icu_dir}/source
/samples
-name '*Makefile.in' -prune -or -type f
-print |
xargs rm
32 # remove data that we currently don't need
33 rm ${icu_dir}/source
/data
/brkitr
/*
34 rm ${icu_dir}/source
/data
/lang
/*.mk
35 rm ${icu_dir}/source
/data
/lang
/*.txt
36 rm ${icu_dir}/source
/data
/mappings
/*.mk
37 find ${icu_dir}/source
/data
/mappings \
38 -name ibm-37_P100-1995.ucm
-prune -or \
39 -name ibm-1047_P100-1995.ucm
-prune -or \
40 -name '*.ucm' -print |
xargs rm
41 rm ${icu_dir}/source
/data
/rbnf
/*
42 rm ${icu_dir}/source
/data
/region
/*.mk
43 rm ${icu_dir}/source
/data
/region
/*.txt
44 rm ${icu_dir}/source
/data
/translit
/*
46 # Record `svn info`, eliding the line that changes every time the entire ICU
47 # repository (not just the path within it we care about) receives a commit.
48 # (This ensures that if ICU modifications are performed properly, it's always
49 # possible to run the command at the top of this script and make no changes to
51 svn info
$1 |
grep -v '^Revision: [[:digit:]]\+$' > ${icu_dir}/SVN-INFO
53 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/bug-724533
54 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/bug-899722-4
55 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/bug-915735
56 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/genrb-omitCollationRules.
diff
57 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/qualify-uinitonce-windows.
diff
58 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/suppress-warnings.
diff
59 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/clang-cl.
diff
61 hg addremove
${icu_dir}