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 Cast" 41(cd data && make clean) 42config_data cast 43$ICUROOT/cast/patch_locale.sh && make -j 120 44$ICUROOT/scripts/copy_data.sh cast 45 46echo "Build the filtered data for Android" 47(cd data && make clean) 48config_data android 49make -j 120 50$ICUROOT/scripts/copy_data.sh android 51 52echo "Build the filtered data for iOS" 53(cd data && make clean) 54config_data ios 55make -j 120 56$ICUROOT/scripts/copy_data.sh ios 57 58echo "Build the filtered data for Flutter" 59(cd data && make clean) 60config_data flutter 61$ICUROOT/flutter/patch_brkitr.sh && make -j 120 62$ICUROOT/scripts/copy_data.sh flutter 63 64echo "Build the filtered data for Flutter Desktop" 65${ICUROOT}/scripts/clean_up_data_source.sh 66(cd data && make clean) 67config_data flutter_desktop 68make -j 120 69$ICUROOT/scripts/copy_data.sh flutter_desktop 70 71echo "Clean up the git" 72$ICUROOT/scripts/clean_up_data_source.sh 73