summaryrefslogtreecommitdiffstats
path: root/intl/update-icu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'intl/update-icu.sh')
-rwxr-xr-xintl/update-icu.sh41
1 files changed, 25 insertions, 16 deletions
diff --git a/intl/update-icu.sh b/intl/update-icu.sh
index 7d78206..18c7124 100755
--- a/intl/update-icu.sh
+++ b/intl/update-icu.sh
@@ -5,19 +5,24 @@
set -e
-# Usage: update-icu.sh <URL of ICU SVN with release>
-# E.g., for ICU 58.2: update-icu.sh https://ssl.icu-project.org/repos/icu/tags/release-58-2/icu4c/
+# Update to an ICU release:
+# Usage: update-icu.sh <URL of ICU GIT> <release tag name>
+# E.g., for ICU 62.1: update-icu.sh https://github.com/unicode-org/icu.git release-62-1
+#
+# Update to an ICU maintenance branch:
+# Usage: update-icu.sh <URL of ICU GIT> <maintenance name>
+# E.g., for ICU 62.1: update-icu.sh https://github.com/unicode-org/icu.git maint/maint-62
-if [ $# -lt 1 ]; then
- echo "Usage: update-icu.sh <URL of ICU SVN with release>"
+if [ $# -lt 2 ]; then
+ echo "Usage: update-icu.sh <URL of ICU GIT> <release tag name>"
exit 1
fi
-# Ensure that $Date$ in the checked-out svn files expands timezone-agnostically,
+# Ensure that $Date$ in the checked-out git files expands timezone-agnostically,
# so that this script's behavior is consistent when run from any time zone.
export TZ=UTC
-# Also ensure SVN-INFO is consistently English.
+# Also ensure GIT-INFO is consistently English.
export LANG=en_US.UTF-8
export LANGUAGE=en_US
export LC_ALL=en_US.UTF-8
@@ -26,7 +31,18 @@ icu_dir=`dirname $0`/icu
# Remove intl/icu/source, then replace it with a clean export.
rm -rf ${icu_dir}/source
-svn export $1/source/ ${icu_dir}/source
+tmpclonedir=$(mktemp -d)
+git clone --depth 1 --branch $2 $1 ${tmpclonedir}
+cp -r ${tmpclonedir}/icu4c/source ${icu_dir}/source
+
+# Record `git log`.
+# (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.)
+git -C ${tmpclonedir} log -1 > ${icu_dir}/GIT-INFO
+
+# Clean up after ourselves.
+rm -rf ${tmpclonedir}
# remove layoutex, tests, and samples, but leave makefiles in place
find ${icu_dir}/source/layoutex -name '*Makefile.in' -prune -or -type f -print | xargs rm
@@ -58,13 +74,6 @@ find ${icu_dir}/source/data/zone \
-name tzdbNames.txt -prune -or \
-name '*.txt' -print | xargs sed -i '/^\s\{4\}zoneStrings{/{N; s/^\s\{4\}zoneStrings{\n\s\{4\}}// }; /^$/d'
-# 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
-
for patch in \
bug-915735 \
suppress-warnings.diff \
@@ -77,13 +86,13 @@ for patch in \
done
topsrcdir=`dirname $0`/../
-python ${topsrcdir}/js/src/tests/ecma_6/String/make-normalize-generateddata-input.py $topsrcdir
+python ${topsrcdir}/js/src/tests/non262/String/make-normalize-generateddata-input.py $topsrcdir
# Update our moz.build files in config/external/icu, and
# build a new ICU data file.
python `dirname $0`/icu_sources_data.py $topsrcdir
-hg addremove "${icu_dir}/source" "${icu_dir}/SVN-INFO" ${topsrcdir}/config/external/icu
+hg addremove "${icu_dir}/source" "${icu_dir}/GIT-INFO" ${topsrcdir}/config/external/icu
# Check local tzdata version.
`dirname $0`/update-tzdata.sh -c