#!/bin/bash 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