1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-13 05:19:50 +04:00

Improved reliability of shell scripts (#699)

* Add double quotes for shell variables
* Added exit for cd command. Prevent run commands after incorrect change directory.
This commit is contained in:
rusdacent
2021-09-13 04:44:02 +03:00
committed by GitHub
parent a4dae290e2
commit 202c1d4b0e
5 changed files with 13 additions and 13 deletions

View File

@@ -7,11 +7,11 @@ if [ "$#" -ne 1 ]; then
exit
fi
if [ ! -f $1 ]; then
if [ ! -f "$1" ]; then
echo "Unable to open OTP file"
exit
fi
STM32_Programmer_CLI -c port=swd -d $1 0x1FFF7000
STM32_Programmer_CLI -c port=swd -d "$1" 0x1FFF7000
STM32_Programmer_CLI -c port=swd -r8 0x1FFF7000 8