File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717
1818
1919# Get the directory where the script is running.
20- DIR=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd )
20+ DIR=$( dirname " $( readlink -f " $0 " ) " )
2121
2222# ----------------- IMPORTANT -----------------
2323# The 2nd parameter to upload-reset is the delay after resetting before it exits
@@ -26,15 +26,15 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
2626# 750ms to 1500ms seems to work on my Mac
2727
2828
29- ${DIR} /upload-reset ${dummy_port_fullpath} 750
29+ " ${DIR} /upload-reset" ${dummy_port_fullpath} 750
3030
3131
3232# DFU_UTIL=$(dirname $0)/dfu-util/dfu-util
3333DFU_UTIL=/usr/bin/dfu-util
3434DFU_UTIL=${DIR} /dfu-util/dfu-util
35- if [ ! -x ${DFU_UTIL} ]; then
35+ if [ ! -x " ${DFU_UTIL} " ]; then
3636 echo " $0 : error: cannot find ${DFU_UTIL} " >&2
3737 exit 2
3838fi
3939
40- ${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile} ${dfuse_addr} -R
40+ " ${DFU_UTIL} " -d ${usbID} -a ${altID} -D ${binfile} ${dfuse_addr} -R
You can’t perform that action at this time.
0 commit comments