From 5a1944c79524f7a5baced2f6ed6d5fbc35232711 Mon Sep 17 00:00:00 2001 From: David Brunell Date: Fri, 30 Oct 2015 13:21:41 -0500 Subject: [PATCH] Fix case of spaces in path to linux tools directory --- tools/linux/maple_upload | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/linux/maple_upload b/tools/linux/maple_upload index 27359d2..d6792cf 100755 --- a/tools/linux/maple_upload +++ b/tools/linux/maple_upload @@ -17,7 +17,7 @@ fi # Get the directory where the script is running. -DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +DIR=$(dirname "$(readlink -f "$0")") # ----------------- IMPORTANT ----------------- # 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 ) # 750ms to 1500ms seems to work on my Mac -${DIR}/upload-reset ${dummy_port_fullpath} 750 +"${DIR}/upload-reset" ${dummy_port_fullpath} 750 #DFU_UTIL=$(dirname $0)/dfu-util/dfu-util DFU_UTIL=/usr/bin/dfu-util DFU_UTIL=${DIR}/dfu-util/dfu-util -if [ ! -x ${DFU_UTIL} ]; then +if [ ! -x "${DFU_UTIL}" ]; then echo "$0: error: cannot find ${DFU_UTIL}" >&2 exit 2 fi -${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile} ${dfuse_addr} -R +"${DFU_UTIL}" -d ${usbID} -a ${altID} -D ${binfile} ${dfuse_addr} -R