#!/bin/bash # Configuration # Note: We point to the specific ARM64 release folder Cargo created LOCAL_BIN="$HOME/dev/Dixon/src/rustylee/target/aarch64-unknown-linux-gnu/release/rustylee" REMOTE_TARGET="russellg59@dixon1" REMOTE_DIR="/home/russellg59/dixon" REMOTE_EXE="$REMOTE_DIR/rustylee" # Changed to avoid overwriting your C++ app # 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"