#!/usr/bin/env bash # rmq.sh - build-if-needed wrapper for the existing tools/rmq host RM oracle. # rmq itself is not modified by the harness; this only locates/builds it. set -euo pipefail HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT="$(cd "$HERE/../../.." && pwd)" BIN="$ROOT/tools/rmq/rmq" # rmq has no --help flag; answer it here so the smoke check never touches the # device (see rmharness/README.md "Safe smoke checks"). case "${1:-}" in -h | --help) echo "usage: $(basename "$0") [rmq-index options] (read-only RM oracle)" echo " rmq has no launcher of its own; see $ROOT/tools/rmq/." echo " Built on first use from $ROOT/tools/rmq." exit 0 ;; esac if [[ ! -x "$BIN" ]]; then make -C "$ROOT/tools/rmq" >&2 fi exec "$BIN" "$@"