Dixon/utils/deploy_rustylee
Russell Gilbert d452578afc Sets up initial Rust project with ARM64 deployment
Introduces the `rustylee` Rust project with a basic "Hello, world!" application.
Configures cross-compilation for `aarch64-unknown-linux-gnu` targets using `cargo.toml`.
Adds a deployment script to automate pushing the compiled ARM64 binary to a remote host.
This enables development and deployment of Rust applications for the target environment.
2026-02-25 07:20:14 +00:00

24 lines
795 B
Bash
Executable file

#!/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"