1
0
mirror of https://github.com/hatlabs/SH-ESP32-test-jig.git synced 2025-05-15 23:00:10 -07:00

Add an autoflash script

This commit is contained in:
Matti Airas 2022-02-15 09:14:33 +02:00
parent 032be6eef7
commit e7f9e1f82e

18
device-under-test/autoflash.sh Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
shopt -s inherit_errexit
SERIAL_DEV=/dev/tty.usbserial-310
while true; do
echo "Insert device."
if [ -c $SERIAL_DEV ]; then
pio run -e esp32dev -t upload
echo "Done. Remove device."
while [ -c $SERIAL_DEV ] ; do
sleep 1
done
fi
sleep 1
done