1#!/bin/sh 2# Copyright (C) 2004-2014, International Business Machines Corporation 3# and others. All Rights Reserved. 4 5# 6###################### 7## 8## See documentation at: http://www.jtcsv.com/cgibin/cldrwiki.pl?CldrTools 9## 10###################### 11# 12# To use: put this in your 'bin' dir, 13# and symlink it to XMLValidator and LDML2ICUConverter 14# 15 16 17## Change the following if needed 18# where icu4j lives (or other classes) 19CLDRCLASSPATH=${HOME}/icu4j/icu4j.jar:${HOME}/icu4j/classes/ 20# the command to use with java (or empty for none) 21CPCMD= 22# how to run java 23JAVA=${JAVA-java} 24 25## Override the above settings in a ~/.cldrrc file if desired (+x) 26# example: 27# CLDRCLASSPATH=${HOME}/J/icu4j/classes 28if [ -x ${HOME}/.cldrrc ]; 29then 30 . ${HOME}/.cldrrc 31fi 32 33if [ "x${CLDRCLASSPATH}" != "x" ]; 34then 35 if [ "x${CPCMD}" = "x" ]; 36 then 37 CPCMD="-classpath ${CLDRCLASSPATH}" 38 fi 39fi 40 41# root name of this script 42ME=`basename $0` 43 44## no need to change below this line. 45# base package 46case $ME 47in 48 "XMLValidator") PKG=org.unicode.cldr.util;; 49 "ShowLanguages") PKG=org.unicode.cldr.tool;; 50 "LDML2ICUConverter") PKG=org.unicode.cldr.icu;; 51 "ConsoleCheckCLDR") PKG=org.unicode.cldr.test;; 52 "Ldml2JsonConverter") PKG=org.unicode.cldr.json;; 53 *) PKG=org.unicode.cldr.tool;; 54esac 55 56#error check 57if [ $PKG = "UNKNOWN" ]; 58then 59 echo "Unknown tool name $ME. Please set the package here.!" 60 exit -1 61fi 62 63 64if [ $ME = "CLDRWrapper" ]; 65then 66 echo "# $ME: Don't run this script directly." 67 echo Symlink $0 to the names XMLValidator, LDML2ICUConverter, and other ${PKG} tools. 68 exit 1 69fi 70exec ${JAVA} ${VM_OPTS} ${WRAPPER_OPTS} ${CWDEFS} ${CPCMD} ${PKG}.${ME} "$@" 71