#!/bin/sh

# $Id: xml2xsd.sh,v 1.1 2004/07/07 04:36:06 snyder Exp $

if [ -z "$JAVA_HOME" ] ; then
  JAVA=`which java`
  if [ -z "$JAVA" ] ; then
    echo "Cannot find JAVA. Please set your PATH."
    exit 1
  fi
  JAVA_BIN=`dirname $JAVA`
  JAVA_HOME=$JAVA_BIN/..
fi

JAVA=$JAVA_HOME/bin/java

CP=$JAVA_HOME/lib/tools.jar:src/etc:build/classes/:$CLASSPATH

for i in `ls ./lib/*.jar`
   do 
       CP=$CP:$i
   done

$JAVA -classpath $CP org.exolab.castor.xml.schema.util.XMLInstance2Schema "$@"
