From 41b3974f3d696fa8152ea61c98f41ca8b2a56cd2 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 19 Sep 2015 15:05:36 +0200 Subject: improved reset-lufa-cdc helper --- tools/reset_lufa_cdc_nowait | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tools/reset_lufa_cdc_nowait') diff --git a/tools/reset_lufa_cdc_nowait b/tools/reset_lufa_cdc_nowait index 47587ac..ac47368 100755 --- a/tools/reset_lufa_cdc_nowait +++ b/tools/reset_lufa_cdc_nowait @@ -1,6 +1,12 @@ #!/bin/bash -echo "resetting device .." -echo $1 > /dev/ttyACM0 +DEVICE_FILE="/dev/ttyACM0" + +if [ -c $DEVICE_FILE ]; then + echo "resetting device .." + echo $1 > /dev/ttyACM0 +else + echo "'$DEVICE_FILE' not found ... device is probably already in bootloader mode - doing nothing" +fi exit 0 -- cgit v1.2.3