#!/bin/sh
# File:        runPy2Java
# Copyright:   (c) 2001 The Regents of the University of California
# Description: Set environment variables and run python
# Revision:    $Revision: 4302 $
# Date:        $Date: 2005-01-12 16:15:29 -0800 (Wed, 12 Jan 2005) $
#

libjvm_dir=LIBJVM_DIR
libjava_dir=LIBJAVA_DIR

PYTHON=PYTHONEXEC
case "`uname`" in
  CYGWIN*) cygwin=true;;
  *) cygwin=false;;
esac


PYTHONPATH=../../../runtime/python
SIDL_DLL_PATH="../libJava/libImpl.scl;../../output/libC/libOutput.scl;../../../runtime/sidl/libsidl.scl"
if test "X${SHARED_LIB_VAR}" = "X"; then
  SHARED_LIB_VAR="${libjvm_dir}:${libjava_dir}:PYTHONLIB"
else
  SHARED_LIB_VAR="${libjvm_dir}:${libjava_dir}:PYTHONLIB:${SHARED_LIB_VAR}"
fi
export PYTHONPATH SIDL_DLL_PATH SHARED_LIB_VAR 

if $cygwin; then
  PATH=$PATH:../../../runtime/sidl/.libs:../../../runtime/sidl/.libs/../bin
  export PATH
fi
CLASSPATH="../libJava:../../../runtime/java:." ; export CLASSPATH
$PYTHON sorttest
