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

Unified Diff: scripts/copy_data.sh

Issue 2743123002: ICU data customization for iOS (Closed)
Patch Set: update BUILD.gn and icudtl.dat for iOS Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/patch_locale.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/copy_data.sh
diff --git a/scripts/copy_data.sh b/scripts/copy_data.sh
index 98b4c08606662eab7c5fb337f30192807c177d5b..607badcbf0e4169ae87a3e6011f43e4b43763d8e 100755
--- a/scripts/copy_data.sh
+++ b/scripts/copy_data.sh
@@ -6,18 +6,48 @@
# This script is tested ONLY on Linux. It may not work correctly on
# Mac OS X.
#
+
+if [ $# -lt 1 ];
+then
+ echo "Usage: "$0" (common|android|ios)" >&2
+ exit 1
+fi
+
TOPSRC="$(dirname "$0")/.."
source "${TOPSRC}/scripts/data_common.sh"
-DATA_PREFIX="data/out/tmp/icudt${VERSION}"
-echo "Generating the big endian data bundle"
-LD_LIBRARY_PATH=lib bin/icupkg -tb "${DATA_PREFIX}l.dat" "${DATA_PREFIX}b.dat"
+function copy_common {
+ DATA_PREFIX="data/out/tmp/icudt${VERSION}"
+
+ echo "Generating the big endian data bundle"
+ LD_LIBRARY_PATH=lib bin/icupkg -tb "${DATA_PREFIX}l.dat" "${DATA_PREFIX}b.dat"
+
+ echo "Copying icudtl.dat and icudtlb.dat"
+ for endian in l b
+ do
+ cp "${DATA_PREFIX}${endian}.dat" "${TOPSRC}/common/icudt${endian}.dat"
+ done
+
+ echo "Done with copying pre-built ICU data files."
+}
+
+function copy_android_ios {
+ echo "Copying icudtl.dat for $1"
+
+ cp "data/out/tmp/icudt${VERSION}l.dat" "${TOPSRC}/$2/icudtl.dat"
-echo "Copying icudtl.dat and icudtlb.dat"
-for endian in l b
-do
- cp "${DATA_PREFIX}${endian}.dat" "${TOPSRC}/common/icudt${endian}.dat"
-done
+ echo "Done with copying pre-built ICU data file for $1."
+}
-echo "Done with copying pre-built ICU data files."
+case "$1" in
+ "common")
+ copy_common
+ ;;
+ "android")
+ copy_android_ios Android android
+ ;;
+ "ios")
+ copy_android_ios iOS ios
+ ;;
+esac
« no previous file with comments | « ios/patch_locale.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698