#!/bin/sh

# Copyright 2008-2015 UnboundID Corp.
# All Rights Reserved.
#
# -----
#
# Copyright (C) 2008-2015 UnboundID Corp.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License (GPLv2 only)
# as published by the Free Software Foundation.
#
# This program 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


# Get the current working directory and the tools directory.
CURRENT_DIR=`pwd`
cd "`dirname "${0}"`"
TOOLS_DIR=`pwd`
cd ${CURRENT_DIR}


# Figure out which Java command to invoke.
if test -z "${UNBOUNDID_JAVA_HOME}"
then
  if test -z "${JAVA_HOME}"
  then
    JAVA_CMD="java"
  else
    JAVA_CMD="${JAVA_HOME}/bin/java"
  fi
else
  JAVA_CMD="${UNBOUNDID_JAVA_HOME}/bin/java"
fi

"${JAVA_CMD}" ${JAVA_ARGS} \
     -cp "${TOOLS_DIR}/../unboundid-ldapsdk-se.jar:${CLASSPATH}" \
     com.unboundid.ldap.sdk.examples.LDAPCompare "${@}"

