From 9e8cee7a16b0c73478e3d6a8269eaeec21a61d03 Mon Sep 17 00:00:00 2001 From: Assistant builder Date: Fri, 12 Jun 2026 09:33:39 +0000 Subject: [PATCH] Add bin/probe-cs: build + scp + run the C# probe on the Pi --- bin/probe-cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 bin/probe-cs diff --git a/bin/probe-cs b/bin/probe-cs new file mode 100644 index 0000000..a0df25d --- /dev/null +++ b/bin/probe-cs @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -euo pipefail + +PI_HOST="${PI_HOST:-192.168.50.115}" +PI_USER="${PI_USER:-pi}" +PI_PASS="${PI_PASS:-assistant}" +PUBLISH_DIR="${PUBLISH_DIR:-/tmp/probe-cs-out}" + +repo_root="$(cd "$(dirname "$0")/.." && pwd)" +cd "$repo_root" + +echo ">> dotnet publish (linux-arm64, self-contained)" +dotnet publish tests/01-record-play-cs \ + -c Release -r linux-arm64 --self-contained \ + -o "$PUBLISH_DIR" + +echo ">> scp to $PI_USER@$PI_HOST:~/probe-cs/ (wipe-and-replace)" +sshpass -p "$PI_PASS" ssh -o StrictHostKeyChecking=accept-new \ + "$PI_USER@$PI_HOST" 'rm -rf ~/probe-cs && mkdir ~/probe-cs' +sshpass -p "$PI_PASS" scp -r "$PUBLISH_DIR/." \ + "$PI_USER@$PI_HOST:~/probe-cs/" + +echo ">> ssh + run on Pi" +sshpass -p "$PI_PASS" ssh -o StrictHostKeyChecking=accept-new \ + "$PI_USER@$PI_HOST" 'cd ~/probe-cs && chmod +x Probe && ./Probe'