diff options
author | Kai Stevenson <kai@kaistevenson.com> | 2024-06-10 23:44:02 +0100 |
---|---|---|
committer | Kai Stevenson <kai@kaistevenson.com> | 2024-06-10 23:44:02 +0100 |
commit | 3b2c796b07e8304ea4047c656d362a52ac3e7388 (patch) | |
tree | be3ce7f05256c43734a20f286fc6a633ec55febc | |
parent | 8edca67d9b427401d7e57131d2d58d6d8018c852 (diff) |
added failsafe if board detection fails
-rw-r--r-- | upload.sh | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,4 +1,8 @@ BOARD="arduino:avr:uno" PORT=$(arduino-cli board list | grep dev | grep -o '^\S*') +if [ -z $PORT ]; +then + return "Failed to find board" +fi arduino-cli compile -b $BOARD arduino-cli upload -p $PORT -b $BOARD |