Skip to content

Commit

Permalink
Quote filename in device-install.sh (#5814)
Browse files Browse the repository at this point in the history
Without these quotes, a filename with spaces would be interpreted as
different arguments.

Thanks to @Hnikar-az for the report.

fixes #5795
  • Loading branch information
fifieldt authored Jan 11, 2025
1 parent 25a5f17 commit 46ea39a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/device-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ shift "$((OPTIND - 1))"
if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
$ESPTOOL_CMD erase_flash
$ESPTOOL_CMD write_flash 0x00 ${FILENAME}
$ESPTOOL_CMD write_flash 0x00 "${FILENAME}"
# Account for S3 board's different OTA partition
if [ -n "${FILENAME##*"s3"*}" ] && [ -n "${FILENAME##*"-v3"*}" ] && [ -n "${FILENAME##*"t-deck"*}" ] && [ -n "${FILENAME##*"wireless-paper"*}" ] && [ -n "${FILENAME##*"wireless-tracker"*}" ] && [ -n "${FILENAME##*"station-g2"*}" ] && [ -n "${FILENAME##*"unphone"*}" ]; then
if [ -n "${FILENAME##*"esp32c3"*}" ]; then
Expand Down

0 comments on commit 46ea39a

Please sign in to comment.