Skip to content

Commit 4f388d2

Browse files
committed
chore(stm32CubeProg): appply shell check and format
Signed-off-by: Frederic Pillon <[email protected]>
1 parent c2b8d22 commit 4f388d2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: stm32CubeProg.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ UNAME_OS="$(uname -s)"
4242
case "${UNAME_OS}" in
4343
Linux*)
4444
STM32CP_CLI=STM32_Programmer.sh
45-
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
45+
if ! command -v $STM32CP_CLI > /dev/null 2>&1; then
4646
export PATH="$HOME/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin":"$PATH"
4747
fi
48-
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
48+
if ! command -v $STM32CP_CLI > /dev/null 2>&1; then
4949
export PATH="/opt/stm32cubeprog/bin":"$PATH"
5050
fi
51-
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
51+
if ! command -v $STM32CP_CLI > /dev/null 2>&1; then
5252
echo "STM32CubeProgrammer not found ($STM32CP_CLI)."
5353
echo "Please install it or add '<STM32CubeProgrammer path>/bin' to your PATH environment:"
5454
echo "https://www.st.com/en/development-tools/stm32cubeprog.html"
@@ -58,10 +58,10 @@ case "${UNAME_OS}" in
5858
;;
5959
Darwin*)
6060
STM32CP_CLI=STM32_Programmer_CLI
61-
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
61+
if ! command -v $STM32CP_CLI > /dev/null 2>&1; then
6262
export PATH="/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin":"$PATH"
6363
fi
64-
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
64+
if ! command -v $STM32CP_CLI > /dev/null 2>&1; then
6565
echo "STM32CubeProgrammer not found ($STM32CP_CLI)."
6666
echo "Please install it or add '<STM32CubeProgrammer path>/bin' to your PATH environment:"
6767
echo "https://www.st.com/en/development-tools/stm32cubeprog.html"
@@ -71,7 +71,7 @@ case "${UNAME_OS}" in
7171
;;
7272
Windows*)
7373
STM32CP_CLI=STM32_Programmer_CLI.exe
74-
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
74+
if ! command -v $STM32CP_CLI > /dev/null 2>&1; then
7575
if [ -n "${PROGRAMFILES+x}" ]; then
7676
STM32CP86=${PROGRAMFILES}/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin
7777
export PATH="${STM32CP86}":"$PATH"
@@ -80,7 +80,7 @@ case "${UNAME_OS}" in
8080
STM32CP=${PROGRAMW6432}/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin
8181
export PATH="${STM32CP}":"$PATH"
8282
fi
83-
if ! command -v $STM32CP_CLI >/dev/null 2>&1; then
83+
if ! command -v $STM32CP_CLI > /dev/null 2>&1; then
8484
echo "STM32CubeProgrammer not found ($STM32CP_CLI)."
8585
echo "Please install it or add '<STM32CubeProgrammer path>\bin' to your PATH environment:"
8686
echo "https://www.st.com/en/development-tools/stm32cubeprog.html"
@@ -143,6 +143,6 @@ if [ $# -gt 0 ]; then
143143
OPTS="$*"
144144
fi
145145

146-
${STM32CP_CLI} -c port=${PORT} ${MODE} ${ERASE:+"-e all"} -q -d "${FILEPATH}" ${ADDRESS} "${OPTS}"
146+
${STM32CP_CLI} -c port=${PORT} ${MODE} ${ERASE:+"-e all"} -q -d "${FILEPATH}" "${ADDRESS}" "${OPTS}"
147147

148148
exit $?

0 commit comments

Comments
 (0)