1#!/bin/bash 2 3# set -x 4 5ICUROOT="$(dirname "$0")/.." 6 7if [ $# -lt 4 ]; 8then 9 echo "Usage: "$0" (android|cast|chromeos|common|flutter|flutter_desktop|ios) icubuilddir1 icubuilddir2 res_file" >&2 10 echo "$0 compare a particlar .res or .icu files of a particular build inside two icu" >&2 11 echo "build directory." >&2 12 echo "These files were previously archived by backup_outdir in scripts/copy_data.sh." >&2 13 echo "The first parameter indicate which build to be compared." >&2 14 echo "The fourth parameter indicate which .res or .icu file to be compared." >&2 15 exit 1 16fi 17 18# Input Parameters 19BUILD=$1 20DIR1=$2 21DIR2=$3 22RES=$4 23 24echo "=======================================================" 25echo " ${BUILD} ${RES} DIFFERENCES" 26echo "=======================================================" 27RESSUBDIR1=`ls ${DIR1}/dataout/${BUILD}/data/out/build` 28RESDIR1="${DIR1}/dataout/${BUILD}/data/out/build/${RESSUBDIR1}" 29RESSUBDIR2=`ls ${DIR2}/dataout/${BUILD}/data/out/build` 30RESDIR2="${DIR2}/dataout/${BUILD}/data/out/build/${RESSUBDIR2}" 31 32RESFILE1=dataout/${BUILD}/data/out/build/${RESSUBDIR1}/${RES} 33RESFILE2=dataout/${BUILD}/data/out/build/${RESSUBDIR2}/${RES} 34TXT1=/tmp/${BUILD}_RES_1.txt 35TXT2=/tmp/${BUILD}_RES_2.txt 36LD_LIBRARY_PATH=${DIR1}/lib ${DIR1}/bin/derb ${RESFILE1} -s ${DIR1}/ -c > ${TXT1} 37LD_LIBRARY_PATH=${DIR2}/lib ${DIR2}/bin/derb ${RESFILE2} -s ${DIR2}/ -c > ${TXT2} 38 39diff -u ${TXT1} ${TXT2} 40