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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user