#!/bin/bash # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2012-2024 Scott Penrose and WII5 Buoy contributors # # This file is part of WII5 Buoy firmware. # See LICENSE for full terms. # Verify the sketch with the Arduino IDE, then rsync the resulting hex to a # remote build host. Configure with env vars (or copy to a *.local.sh and edit): : "${WII5_ARDUINO_BIN:=arduino}" # path to Arduino IDE binary : "${WII5_BUILD_DIR:?set to your Arduino build dir}" : "${WII5_AVRDUDE_CONF:?path to avrdude.conf}" : "${WII5_REMOTE:?e.g. user@host}" : "${WII5_REMOTE_PORT:=22}" "$WII5_ARDUINO_BIN" \ --verify app/wii5_buoy/wii5_buoy.ino \ --board WII:avr:wii5_v2_2560_3V:cpu=atmega25603V3_11MHz230400 rsync -av -e "ssh -p $WII5_REMOTE_PORT" \ "$WII5_AVRDUDE_CONF" "$WII5_BUILD_DIR"/*.hex \ "$WII5_REMOTE:~/firmware/"