Skip to content

Commit 5a1944c

Browse files
committed
Fix case of spaces in path to linux tools directory
1 parent bd6d3b5 commit 5a1944c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tools/linux/maple_upload

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
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
3333
DFU_UTIL=/usr/bin/dfu-util
3434
DFU_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
3838
fi
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

0 commit comments

Comments
 (0)