Simplifies the RobotNode build process by linking directly to system gpiod libraries instead of including a local copy. This reduces redundancy and ensures compatibility with the system's gpiod installation. Adds a deployment script for easier deployment to the robot, streamlining the update process. Also introduces a script to automatically fix symlinks during cross-compilation, ensuring that links resolve correctly on the target system.
22 lines
665 B
Bash
Executable file
22 lines
665 B
Bash
Executable file
#!/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"
|