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/.
6 # Usage: update-icu.sh <URL of ICU SVN with release>
7 # E.g., for ICU 50.1.1: update-icu.sh http://source.icu-project.org/repos/icu/icu/tags/release-50-1-1/
10 echo "Usage: update-icu.sh <URL of ICU SVN with release>"
14 icu_dir
=`dirname $0`/icu
16 svn
export $1 ${icu_dir}
18 # remove layout, tests, and samples, but leave makefiles in place
19 find ${icu_dir}/source
/layout
-name '*Makefile.in' -prune -or -type f
-print |
xargs rm
20 find ${icu_dir}/source
/layoutex
-name '*Makefile.in' -prune -or -type f
-print |
xargs rm
21 find ${icu_dir}/source
/test -name '*Makefile.in' -prune -or -type f
-print |
xargs rm
22 find ${icu_dir}/source
/samples
-name '*Makefile.in' -prune -or -type f
-print |
xargs rm
24 # remove data that we currently don't need
25 rm ${icu_dir}/source
/data
/brkitr
/*
26 rm ${icu_dir}/source
/data
/lang
/*.mk
27 rm ${icu_dir}/source
/data
/lang
/*.txt
28 rm ${icu_dir}/source
/data
/mappings
/*.mk
29 find ${icu_dir}/source
/data
/mappings \
30 -name ibm-37_P100-1995.ucm
-prune -or \
31 -name ibm-1047_P100-1995.ucm
-prune -or \
32 -name '*.ucm' -print |
xargs rm
33 rm ${icu_dir}/source
/data
/rbnf
/*
34 rm ${icu_dir}/source
/data
/region
/*.mk
35 rm ${icu_dir}/source
/data
/region
/*.txt
36 rm ${icu_dir}/source
/data
/translit
/*
39 svn info
$1 > ${icu_dir}/SVN-INFO
41 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/bug-724533
42 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/bug-853706
43 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/bug-899722
44 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/bug-899722-2
45 patch -d ${icu_dir}/..
/..
/ -p1 < ${icu_dir}/..
/icu-patches
/bug-899722-4
47 hg addremove
${icu_dir}