#!/bin/sh
# 
# Copyright (C) 1999, 2000, 2001  Network Associates, Incorporated (NAI)
# All rights reserved.
#
# This file is part of the NAI Generic Software Wrappers Toolkit
# (GSWTK).  See ftp://ftp.tislabs.com/pub/wrappers/ for the latest
# distribution.
#
# The GSWTK is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# The GSWTK is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this software; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
# $Id: jwreview,v 1.11 2001/04/05 18:41:17 stevek Exp $

EVENTFSPATH=../../toolkits/eventfs/src
EFSCLASSES=${EVENTFSPATH}/classes
EFSJNI=${EFSCLASSES}/native
WRCLASSES=../../wr.classes
WRVJNI=${WRCLASSES}/native

if [ -z "$CLASSPATH" ]; then
	CLASSPATH=${WRCLASSES}/gswtk.jar:gswtk.jar:${WRCLASSES}/jcbwt350.jar:jcbwt350.jar:${EFSCLASSES}/eventfs.jar:eventfs.jar:.
else
	CLASSPATH=${WRCLASSES}/gswtk.jar:gswtk.jar:${WRCLASSES}/jcbwt350.jar:jcbwt350.jar:${EFSCLASSES}/eventfs.jar:eventfs.jar:.:$CLASSPATH
fi

if [ -z "$LD_LIBRARY_PATH" ]; then
	LD_LIBRARY_PATH=`pwd`
else
	LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
fi

#BEGIN IGNORE (For installation target)
if [ ! -h libeventfsnative.so.1.0 -a -f ${EFSJNI}/libeventfsnative.so.1.0 ]; then
	ln -s ${EFSJNI}/libeventfsnative.so.1.0 libeventfsnative.so.1.0
fi

if [ ! -h libeventfsnative.so ]; then
	ln -s libeventfsnative.so.1.0 libeventfsnative.so
fi

if [ ! -h libgswtknative.so.1.0 -a -f ${WRVJNI}/libgswtknative.so.1.0 ]; then
	ln -s ${WRVJNI}/libgswtknative.so.1.0 libgswtknative.so.1.0
fi

if [ ! -h libgswtknative.so ]; then
	ln -s libgswtknative.so.1.0 libgswtknative.so
fi
#END IGNORE

export CLASSPATH LD_LIBRARY_PATH

java $* jwreview

