Fix case of spaces in path to linux tools directory

This commit is contained in:
David Brunell 2015-10-30 13:21:41 -05:00
parent bd6d3b5092
commit 5a1944c795
1 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ fi
# Get the directory where the script is running. # Get the directory where the script is running.
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) DIR=$(dirname "$(readlink -f "$0")")
# ----------------- IMPORTANT ----------------- # ----------------- IMPORTANT -----------------
# The 2nd parameter to upload-reset is the delay after resetting before it exits # 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 # 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=$(dirname $0)/dfu-util/dfu-util
DFU_UTIL=/usr/bin/dfu-util DFU_UTIL=/usr/bin/dfu-util
DFU_UTIL=${DIR}/dfu-util/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 echo "$0: error: cannot find ${DFU_UTIL}" >&2
exit 2 exit 2
fi fi
${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile} ${dfuse_addr} -R "${DFU_UTIL}" -d ${usbID} -a ${altID} -D ${binfile} ${dfuse_addr} -R