#!/usr/bin/env sh
# Push sources to the Pi and build there.
#   usage:  ./deploy.sh me@10.91.51.165
set -eu
host=${1:-me@10.91.51.165}
rsync -az --delete --exclude=camera --exclude=result \
  ./ "$host:~/camera_example/"
ssh "$host" 'cd ~/camera_example && make -j"$(nproc)"'
echo "built at $host:~/camera_example/camera"
