#!/bin/bash # Check if Rust CLI binaries are up-to-date # Usage: ./scripts/check_toolchain.sh set -e echo "=== Checking Rust CLI Binaries ===" echo "" PROJECT_ROOT="/Users/accusys/momentry_core" RUST_TOOLS_DIR="$PROJECT_ROOT/tools/cli/rust" BINARIES=("rust_face_cluster" "rust_appearance" "rust_pose" "rust_vad") outdated=0 for bin in "${BINARIES[@]}"; do source="$RUST_TOOLS_DIR/src/bin/${bin}.rs" binary="$RUST_TOOLS_DIR/target/release/${bin}" if [ ! -f "$source" ]; then echo "⚠️ Source file not found: $source" continue fi if [ ! -f "$binary" ]; then echo "❌ Binary not found: $binary" echo " Run: cd $RUST_TOOLS_DIR && cargo build --release" outdated=1 continue fi if [ "$source" -nt "$binary" ]; then echo "⚠️ $binary is outdated!" echo " Source: $(stat -f "%Sm" "$source")" echo " Binary: $(stat -f "%Sm" "$binary")" echo " Run: cd $RUST_TOOLS_DIR && cargo build --release" outdated=1 else echo "✅ $binary is up-to-date" fi done echo "" if [ $outdated -eq 1 ]; then echo "❌ Some binaries are outdated or missing" echo "" echo "To fix:" echo " cd $RUST_TOOLS_DIR" echo " cargo build --release" exit 1 else echo "✅ All binaries are up-to-date" fi