1#!/bin/bash 2 3set -x -e # stop if fail 4 5ICUROOT="$(dirname "$0")/.." 6 7function config_data { 8 if [ $# -lt 1 ]; 9 then 10 echo "config target missing." >&2 11 echo "Should be (android|cast|chromeos|common|flutter|flutter_desktop|ios)" >&2 12 exit 1 13 fi 14 15 ICU_DATA_FILTER_FILE="${ICUROOT}/filters/$1.json" \ 16 "${ICUROOT}/source/runConfigureICU" --enable-debug --disable-release \ 17 Linux/gcc --disable-tests --disable-layoutex --enable-rpath \ 18 --prefix="$(pwd)" || \ 19 { echo "failed to configure data for $1" >&2; exit 1; } 20} 21 22echo "Build the necessary tools" 23"${ICUROOT}/source/runConfigureICU" --enable-debug --disable-release \ 24 Linux/gcc --disable-tests --disable-layoutex --enable-rpath \ 25 --prefix="$(pwd)" 26make -j 120 27 28echo "Build the filtered data for common" 29(cd data && make clean) 30config_data common 31make -j 120 32$ICUROOT/scripts/copy_data.sh common 33 34echo "Build the filtered data for chromeos" 35(cd data && make clean) 36config_data chromeos 37make -j 120 38$ICUROOT/scripts/copy_data.sh chromeos 39 40echo "Build the filtered data for Chromecast Video" 41(cd data && make clean) 42config_data chromecast_video 43make -j 120 44$ICUROOT/scripts/copy_data.sh chromecast_video 45 46echo "Build the filtered data for Cast" 47(cd data && make clean) 48config_data cast 49$ICUROOT/cast/patch_locale.sh || exit 1 50make -j 120 51$ICUROOT/scripts/copy_data.sh cast 52 53echo "Build the filtered data for Android" 54(cd data && make clean) 55config_data android 56make -j 120 57$ICUROOT/scripts/copy_data.sh android 58 59echo "Build the filtered data for iOS" 60(cd data && make clean) 61config_data ios 62make -j 120 63$ICUROOT/scripts/copy_data.sh ios 64 65echo "Build the filtered data for Flutter" 66(cd data && make clean) 67config_data flutter 68$ICUROOT/flutter/patch_brkitr.sh || exit 1 69make -j 120 70$ICUROOT/scripts/copy_data.sh flutter 71 72echo "Build the filtered data for Flutter Desktop" 73${ICUROOT}/scripts/clean_up_data_source.sh 74(cd data && make clean) 75config_data flutter_desktop 76make -j 120 77$ICUROOT/scripts/copy_data.sh flutter_desktop 78 79echo "Clean up the git" 80$ICUROOT/scripts/clean_up_data_source.sh 81