#!/usr/bin/env bash set -euo pipefail # install_rti.sh # Install RTI Connext from a local installer archive (user-supplied, due to licensing) # Expected file: ../rti-connext-7.7.0.tar.gz or provided as first arg RTI_ARCHIVE=${1:-../rti-connext-7.7.0.tar.gz} INSTALL_PREFIX=${2:-/opt/RTI} if [[ ! -f "$RTI_ARCHIVE" ]]; then echo "RTI Connext archive not found at $RTI_ARCHIVE" echo "Please place rti-connext-7.7.0 archive at that path or pass path as first arg." exit 1 fi echo "Installing RTI Connext from $RTI_ARCHIVE to $INSTALL_PREFIX" sudo mkdir -p "$INSTALL_PREFIX" sudo chown $(id -u):$(id -g) "$INSTALL_PREFIX" echo "Extracting..." tar xzf "$RTI_ARCHIVE" -C "$INSTALL_PREFIX" --strip-components=1 # Typical Connext installs provide scripts under $INSTALL_PREFIX/etc or bin - advise user if [[ -f "$INSTALL_PREFIX/rticonnextdds-cxx-X.Y.Z/setup.sh" ]]; then echo "Found setup script; source it in your environment when building." fi echo "RTI Connext files are in $INSTALL_PREFIX" echo "Note: You may need to run vendor installer or agree license terms interactively; this script assumes an already prepared archive." echo "Cloning RTI Community helper repos (examples/connectors)" if [[ ! -d "/opt/rticommunity" ]]; then sudo mkdir -p /opt/rticommunity sudo chown $(id -u):$(id -g) /opt/rticommunity fi pushd /opt/rticommunity >/dev/null if [[ ! -d rticonnextdds-connector ]]; then git clone https://github.com/rticommunity/rticonnextdds-connector.git || true fi popd >/dev/null echo "RTI install script finished. Please verify licensing and run vendor-provided installers if required."