#!/bin/bash

# This file is part of bot2-lcm-utils.
#
# bot2-lcm-utils is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# bot2-lcm-utils 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 Lesser General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with bot2-lcm-utils. If not, see <https://www.gnu.org/licenses/>.

# Generated by CMake 3.18.4 for bot2-lcm-utils. Any changes to this
# file will be overwritten by the next CMake run. The input file was
# bot-spy.sh.in.

for d in . .. ../.. ../../.. ../../../.. "/usr"; do
  if [ -d $d/share/java ]; then
    jd=$d/share/java
    echo Checking $jd
    for f in $jd/lcmtypes_*.jar $jd/lcmspy_plugins_*.jar; do
      if [ -e $f ]; then
        echo "   Found $f"
        CLASSPATH="${CLASSPATH:+$CLASSPATH:}$f"
      fi
    done
  fi
done
export CLASSPATH
exec "/usr/bin/lcm-spy"
