2013-03-02 08:53:01 +04:00
|
|
|
#!/bin/sh
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
# Usage: update-icu.sh <URL of ICU SVN with release>
|
2014-01-31 04:57:49 +04:00
|
|
|
# E.g., for ICU 50.1.1: update-icu.sh http://source.icu-project.org/repos/icu/icu/tags/release-50-1-1/
|
2013-03-02 08:53:01 +04:00
|
|
|
|
|
|
|
if [ $# -lt 1 ]; then
|
|
|
|
echo "Usage: update-icu.sh <URL of ICU SVN with release>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-01-04 03:44:24 +04:00
|
|
|
# Ensure that $Date$ in the checked-out svn files expands timezone-agnostically,
|
|
|
|
# so that this script's behavior is consistent when run from any time zone.
|
|
|
|
export TZ=UTC
|
|
|
|
|
2013-03-02 08:53:01 +04:00
|
|
|
icu_dir=`dirname $0`/icu
|
2014-01-31 04:57:49 +04:00
|
|
|
rm -rf ${icu_dir}
|
|
|
|
svn export $1 ${icu_dir}
|
2013-03-02 08:53:01 +04:00
|
|
|
|
|
|
|
# remove layout, tests, and samples, but leave makefiles in place
|
|
|
|
find ${icu_dir}/source/layout -name '*Makefile.in' -prune -or -type f -print | xargs rm
|
|
|
|
find ${icu_dir}/source/layoutex -name '*Makefile.in' -prune -or -type f -print | xargs rm
|
|
|
|
find ${icu_dir}/source/test -name '*Makefile.in' -prune -or -type f -print | xargs rm
|
|
|
|
find ${icu_dir}/source/samples -name '*Makefile.in' -prune -or -type f -print | xargs rm
|
|
|
|
|
|
|
|
# remove data that we currently don't need
|
|
|
|
rm ${icu_dir}/source/data/brkitr/*
|
|
|
|
rm ${icu_dir}/source/data/lang/*.mk
|
|
|
|
rm ${icu_dir}/source/data/lang/*.txt
|
|
|
|
rm ${icu_dir}/source/data/mappings/*.mk
|
|
|
|
find ${icu_dir}/source/data/mappings \
|
|
|
|
-name ibm-37_P100-1995.ucm -prune -or \
|
|
|
|
-name ibm-1047_P100-1995.ucm -prune -or \
|
|
|
|
-name '*.ucm' -print | xargs rm
|
|
|
|
rm ${icu_dir}/source/data/rbnf/*
|
|
|
|
rm ${icu_dir}/source/data/region/*.mk
|
|
|
|
rm ${icu_dir}/source/data/region/*.txt
|
|
|
|
rm ${icu_dir}/source/data/translit/*
|
|
|
|
|
2013-12-15 01:04:21 +04:00
|
|
|
# Record `svn info`, eliding the line that changes every time the entire ICU
|
|
|
|
# repository (not just the path within it we care about) receives a commit.
|
|
|
|
# (This ensures that if ICU modifications are performed properly, it's always
|
|
|
|
# possible to run the command at the top of this script and make no changes to
|
|
|
|
# the tree.)
|
|
|
|
svn info $1 | grep -v '^Revision: [[:digit:]]\+$' > ${icu_dir}/SVN-INFO
|
2013-03-02 08:53:01 +04:00
|
|
|
|
2013-08-14 15:03:36 +04:00
|
|
|
patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/bug-724533
|
2014-01-31 04:57:49 +04:00
|
|
|
patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/bug-853706
|
|
|
|
patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/bug-899722
|
|
|
|
patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/bug-899722-2
|
2013-08-21 00:42:42 +04:00
|
|
|
patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/bug-899722-4
|
2013-08-14 15:03:36 +04:00
|
|
|
|
2013-03-02 08:53:01 +04:00
|
|
|
hg addremove ${icu_dir}
|