Skip to content

Commit 4502933

Browse files
committed
fix: double quote to prevent globbing and word splitting
shellcheck(SC2086) Signed-off-by: Frederic Pillon <[email protected]>
1 parent d0ccf25 commit 4502933

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

linux/maple_upload.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fi
3636

3737
COUNTER=5
3838
while
39-
"${DIR}/dfu-util.sh" -d "${usbID}" -a "${altID}" -D "${binfile}" ${dfuse_addr} -R
39+
"${DIR}/dfu-util.sh" -d "${usbID}" -a "${altID}" -D "${binfile}" "${dfuse_addr}" -R
4040
((ret = $?))
4141
do
4242
if [ $ret -eq 74 ] && [ $((--COUNTER)) -gt 0 ]; then

macosx/maple_upload.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fi
3636

3737
COUNTER=5
3838
while
39-
"${DIR}/dfu-util.sh" -d "${usbID}" -a "${altID}" -D "${binfile}" ${dfuse_addr} -R
39+
"${DIR}/dfu-util.sh" -d "${usbID}" -a "${altID}" -D "${binfile}" "${dfuse_addr}" -R
4040
((ret = $?))
4141
do
4242
if [ $ret -eq 74 ] && [ $((--COUNTER)) -gt 0 ]; then

stm32CubeProg.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ case "${UNAME_OS}" in
4141
Linux*)
4242
STM32CP_CLI=STM32_Programmer.sh
4343
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
44-
export PATH="$HOME/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin":$PATH
44+
export PATH="$HOME/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin":"$PATH"
4545
fi
4646
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
47-
export PATH="/opt/stm32cubeprog/bin":$PATH
47+
export PATH="/opt/stm32cubeprog/bin":"$PATH"
4848
fi
4949
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
5050
echo "STM32CubeProgrammer not found ($STM32CP_CLI)."
@@ -57,7 +57,7 @@ case "${UNAME_OS}" in
5757
Darwin*)
5858
STM32CP_CLI=STM32_Programmer_CLI
5959
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
60-
export PATH="/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin":$PATH
60+
export PATH="/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin":"$PATH"
6161
fi
6262
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
6363
echo "STM32CubeProgrammer not found ($STM32CP_CLI)."
@@ -72,11 +72,11 @@ case "${UNAME_OS}" in
7272
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
7373
if [ -n "${PROGRAMFILES+x}" ]; then
7474
STM32CP86=${PROGRAMFILES}/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin
75-
export PATH=${STM32CP86}:$PATH
75+
export PATH="${STM32CP86}":"$PATH"
7676
fi
7777
if [ -n "${PROGRAMW6432+x}" ]; then
7878
STM32CP=${PROGRAMW6432}/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin
79-
export PATH=${STM32CP}:$PATH
79+
export PATH="${STM32CP}":"$PATH"
8080
fi
8181
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
8282
echo "STM32CubeProgrammer not found ($STM32CP_CLI)."

0 commit comments

Comments
 (0)