#!/bin/bash
# (C) 2024 Jose Luis Rivero
# Author: Jose Luis Rivero <jrivero@osrfoundation.org>

set -ex

WORKDIR=$(mktemp -d)
trap 'rm -rf $WORKDIR' 0 INT QUIT ABRT PIPE TERM
cd "$WORKDIR"

# Useful to check that binaries built with dynamic languages
# are able to load everything fine.
for binary in lcm-gen \
  lcm-logfilter \
  lcm-logger \
  lcm-logplayer \
  lcm-logplayer-gui \
  lcm-source \
  lcm-spy; do
    ${binary} -h || true
    ${binary} -h 2>&1 | grep -i "usage: lcm"
done
