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 11COMMON=../../common 12 13write_index() 14{ 15 TREE=$1 16 OUTF=${TREE}/index.html 17 18 echo "INFO: Writing index file " ${OUTF} 19 cat > ${OUTF} <<"EOF" 20<html> 21<head> 22 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 23 <title>Draft/ALT for CLDR</title> 24 <style> 25 <!-- 26 table { border-spacing: 0; border-collapse: collapse; 27 border: 1px solid black } 28 td, th { border-spacing: 0; border-collapse: collapse; color: black; 29 vertical-align: top; border: 1px solid black } 30 --> 31 </style> 32 </head><body bgcolor="white"> 33<h1>CLDR 1.2a - Drafts and Alts</h1> 34EOF 35 36 date >> ${OUTF} 37 echo '<br/>' >> ${OUTF} 38 echo '<h3><a href="http://www.jtcsv.com/cgibin/cldrwiki.pl?InterimVettingCharts">What is this? Click here!</a></h3>' >> ${OUTF} 39 echo '<br/>' >> ${OUTF} 40 cat >> ${OUTF} <<EOF 41<table border=1> 42 <tr><th>Locale</th><th>Name</th><th># of changes</th><th>CVS</th></tr> 43EOF 44 45 cat ${TREE}/*.idx >> ${OUTF} 46 rm ${TREE}/*.idx 47 48 cat >> ${OUTF} <<EOF 49</table> 50<p> 51EOF 52 53 echo '<h3><a href="http://www.jtcsv.com/cgibin/cldrwiki.pl?InterimVettingCharts">What is this? Click here!</a></h3>' >> ${OUTF} 54 echo '<br/>' >> ${OUTF} 55 echo '<i>Interim page - subject to change.</i> ' >> ${OUTF} 56 date >> ${OUTF} 57 cat >> ${OUTF} <<EOF 58</body> 59</html> 60EOF 61 62} 63 64backup_tree() 65{ 66 TREE=$1 67 rm -rf ${TREE}.backup1 68 mv ${TREE}.backup0 ${TREE}.backup1 69 mv ${TREE} ${TREE}.backup1 70} 71 72compare_tree() 73{ 74 TREE=$1 75 mkdir ${TREE} 76 for file in `cd ${COMMON}/${TREE} ; ls ${MATCHIT}*.xml | fgrep -v supplementalData`; 77 do 78# echo ${TREE} _ ${file} 79 LDMLComparator -d ./${TREE} -vetting -common:gold ${COMMON}/${TREE}/${file} 80 done 81} 82 83mkdir -p ../diff/vetting 84cd ../diff/vetting 85if [ ! -d ${COMMON}/main ]; 86then 87 echo `basename $0` ":## Error: run me from locale/tools." 88 exit 1 89fi 90 91echo "INFO: Starting in ../diff/vetting" 92 93backup_tree main 94compare_tree main 95write_index main 96echo "INFO: Done with ../diff/vetting" 97