#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

readonly TARGET_HOST=raspiwork
readonly TARGET_PATH=/home/pi/Scripts/device
readonly TARGET_ARCH=aarch64-unknown-linux-gnu
readonly SOURCE_PATH=./target/${TARGET_ARCH}/release/device

cargo build --release --target=${TARGET_ARCH}
scp ${SOURCE_PATH} ${TARGET_HOST}:${TARGET_PATH}
