#!/bin/bash # XXX Cruft echo "Clean." make clean && \ echo "Build." make xd87:default_tkl_ansi && \ echo "Erase." dfu-programmer atmega32u4 erase \ || ( echo "Hold down left shift, right shift, and b to enter dfu flashing mode" ; exit ) echo "Flash." dfu-programmer atmega32u4 flash ./xd87_default_tkl_ansi.hex echo "Reset." dfu-programmer atmega32u4 reset