File tree Expand file tree Collapse file tree 2 files changed +19
-12
lines changed Expand file tree Collapse file tree 2 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Get the directory where the script is running.
4+ DIR=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd)
5+
6+ DFU_UTIL=${DIR} /dfu-util/dfu-util
7+ if [ ! -x " ${DFU_UTIL} " ]; then
8+ DFU_UTIL=/opt/local/bin/dfu-util
9+ fi
10+
11+ # Not found!
12+ if [ ! -x " ${DFU_UTIL} " ]; then
13+ echo " $0 : error: cannot find ${DFU_UTIL} " >&2
14+ exit 2
15+ fi
16+
17+ # Pass all parameters through
18+ " ${DFU_UTIL} " " $@ "
Original file line number Diff line number Diff line change 4040 dfuse_addr=" "
4141fi
4242
43- # DFU_UTIL=/usr/local/bin/dfu-util
44- DFU_UTIL=${DIR} /dfu-util/dfu-util
45- if [ ! -x " ${DFU_UTIL} " ]; then
46- DFU_UTIL=/opt/local/bin/dfu-util
47- fi
48-
49- if [ ! -x ${DFU_UTIL} ]; then
50- echo " $0 : error: cannot find ${DFU_UTIL} " >&2
51- exit 2
52- fi
53-
54- ${DFU_UTIL} -d " ${usbID} " -a " ${altID} " -D " ${binfile} " -R ${dfuse_addr} -R
43+ " ${DIR} /dfu-util.sh" -d " ${usbID} " -a " ${altID} " -D " ${binfile} " -R ${dfuse_addr} -R
5544
5645echo -n Waiting for " ${dummy_port_fullpath} " serial...
5746
You can’t perform that action at this time.
0 commit comments