#!/bin/bash # Configuration LOCAL_BIN="$HOME/dev/Dixon/src/RobotNode/cmake-build-pi5-debug/dixon" REMOTE_TARGET="russellg59@192.168.1.224" REMOTE_DIR="/home/russellg59/dixon" REMOTE_EXE="$REMOTE_DIR/dixon" # Check if the monster PC actually finished the build if [ ! -f "$LOCAL_BIN" ]; then echo "Error: Binary not found at $LOCAL_BIN" exit 1 fi echo "Cleaning remote path and pushing binary..." # Remove the target first to prevent the 'directory' bug, then push and fix permissions ssh $REMOTE_TARGET "rm -rf $REMOTE_EXE" scp "$LOCAL_BIN" $REMOTE_TARGET:"$REMOTE_EXE" ssh $REMOTE_TARGET "chmod +x $REMOTE_EXE" echo "Deployment complete: $REMOTE_EXE"