#!/bin/zsh # From your Mac: copies the bridge to a Raspberry Pi on your Wi-Fi and installs it. # ./bridge/setup-pi-from-mac.sh inkpilot.local # ./bridge/setup-pi-from-mac.sh henry@inkpilot.local HOST="${1:-inkpilot.local}" cd "$(dirname "$0")" echo "Copying the bridge to $HOST..." scp -q inkpilot_bridge.py install-pi.sh "$HOST":~/ || { echo "Couldn't reach $HOST. Is the Pi on and on the same Wi-Fi?"; exit 1; } ssh -t "$HOST" "bash ~/install-pi.sh"