1#!/bin/sh
2# Copyright (C) 2004, International Business Machines Corporation
3#  and others.  All Rights Reserved.
4#
5# Run this in locale/tools and it will create an InterimVettingChart in ../vetting/main
6
7# Prefix - will only show files which match the prefix.
8MATCHIT=
9#MATCHIT=ar
10#MATCHIT=fi
11ROOT=..
12COMMON=${ROOT}/common
13
14backup_tree()
15{
16    TREE=$1
17    rm -rf ${TREE}.new
18    mkdir ${TREE}.new
19    cp -r ${TREE}/CVS ${TREE}.new/
20    rm -rf ${TREE}.backup1
21    mv ${TREE}.backup0 ${TREE}.backup1
22    mv ${TREE} ${TREE}.backup1
23    mv ${TREE}.new ${TREE}
24}
25
26compare_tree()
27{
28    TREE=$1
29    for file in `cd ${COMMON}/${TREE} ; ls ${MATCHIT}*.xml | fgrep -v supplementalData`;
30      do
31      what=""
32      for plat in ibmjdk sunjdk windows open_office aix linux solaris hp;
33        do
34        if [ -f ${ROOT}/${plat}/${TREE}/${file} ]; then
35            what="${what} -${plat} ${ROOT}/${plat}/${TREE}/${file}"
36        fi
37      done
38      echo ${what}
39      LDMLComparator -d ./${TREE} -common:gold ${COMMON}/${TREE}/${file} ${what}
40
41#-ibmjdk ${ROOT}/ibmjdk/${TREE}/${file}
42#-sunjdk ${ROOT}/sunjdk/${TREE}/${file}
43#-windows ${ROOT}/windows/${TREE}/${file}
44#-open_office ${ROOT}/open_office/${TREE}/${file}
45#-aix ${ROOT}/aix/${TREE}/${file}
46#-linux ${ROOT}/linux/${TREE}/${file}
47#-solaris ${ROOT}/solaris/${TREE}/${file}
48#-hp ${ROOT}/hp/${TREE}/${file}
49
50    done
51}
52
53mkdir -p ../diff
54cd ../diff
55if [ ! -d ${COMMON}/main ];
56then
57    echo `basename $0` ":## Error: run me from locale/tools."
58    exit 1
59fi
60
61echo "INFO: Starting in ../diff/"
62
63#backup_tree collation
64#compare_tree collation
65backup_tree main
66compare_tree main
67echo "INFO: Done with ../diff/"
68