firmware/bin
Neil Hanlon 622023de8b
fix(device-update.sh): safely filter args without breaking parsing (#7305)
The previous method of removing `--change-mode` from the argument list used a
string (`NEW_ARGS`) and `eval set -- $NEW_ARGS` to reconstruct the positional
parameters. This was both unsafe and incorrect.

Because `NEW_ARGS` was built using quoted literal `$arg` strings instead of the
actual values, it resulted in all filtered arguments being set to the same last
value of `$arg`. This caused `getopts` to receive incorrect input and silently
fail to parse options like `-p` and `-f`, leading to broken behavior and unset
variables (e.g., `ESPTOOL_CMD` never got a port).

This patch rewrites the logic to use an array (`NEW_ARGS+=("$arg")`), and
resets positional parameters via `set -- "${NEW_ARGS[@]}"`. This preserves
argument integrity and avoids the unsafe use of `eval`.

Example of the broken behavior before this fix:

  ./device-update.sh -p /dev/ttyACM0 -f firmware.bin

Resulted in:

  set -- firmware.bin firmware.bin firmware.bin firmware.bin

Now:

  set -- -p /dev/ttyACM0 -f firmware.bin

as expected.

Signed-off-by: Neil Hanlon <neil@shrug.pw>
2025-07-13 06:19:58 -05:00
..
bump_metainfo FlatHub: bump metainfo.xml on release (#6578) 2025-04-15 18:57:21 -04:00
config.d Support native configuration Waveshare Pico LoRa module on Orange Pi Zero3 (#7295) 2025-07-11 06:54:37 -05:00
generic
.gitignore
99-meshtasticd-udev.rules Linux: Adjust udev rules for gpio (#6891) 2025-05-26 06:31:10 -05:00
base64_to_hex.py
build-esp32.sh Build: Update platformio with pkg install (#7315) 2025-07-12 14:35:57 -05:00
build-firmware.sh add firmware build script for use with docker 2025-02-03 16:48:10 +01:00
build-native.sh Build: Update platformio with pkg install (#7315) 2025-07-12 14:35:57 -05:00
build-nrf52.sh Build: Update platformio with pkg install (#7315) 2025-07-12 14:35:57 -05:00
build-rp2xx0.sh Build: Update platformio with pkg install (#7315) 2025-07-12 14:35:57 -05:00
build-stm32wl.sh Build: Update platformio with pkg install (#7315) 2025-07-12 14:35:57 -05:00
build-userprefs-json.py
buildinfo.py
bump_version.py
check-all.sh cppcheck-supress to ignore intentional error 2025-06-15 16:37:19 -05:00
check-dependencies.sh Remove heltec-v1 2024-02-21 10:03:45 -06:00
config-dist.yaml Add first config override for Native (#7306) 2025-07-11 16:09:59 -05:00
device-install_test.ps1 Update device-install scripts (#6267) 2025-03-09 06:43:16 -05:00
device-install.bat Remove bundling of web-ui from ESP32 devices (#7143) 2025-06-26 10:57:33 -05:00
device-install.sh Fix install script (#7259) 2025-07-07 19:36:21 -05:00
device-update.bat Add --1200bps-reset param to device-install/update scripts (#6752) 2025-06-02 20:35:26 -05:00
device-update.sh fix(device-update.sh): safely filter args without breaking parsing (#7305) 2025-07-13 06:19:58 -05:00
dump-ram-users.sh
exception_decoder.py
gen-images.sh
generate_ci_matrix.py Fix issue with CI not picking up elecrow panels due to confusing env 2025-06-11 06:09:25 -05:00
genpartitions.py
lilygo_techo_bootloader-0.6.1.zip
mergehex
Meshtastic_nRF52_factory_erase_v3_S140_6.1.0.uf2
Meshtastic_nRF52_factory_erase_v3_S140_7.3.0.uf2
meshtasticd.service Stop the madness! Run as a user (not root) (#6718) 2025-05-15 06:40:46 -05:00
native-gdbserver.sh
native-install.sh Stop the madness! Run as a user (not root) (#6718) 2025-05-15 06:40:46 -05:00
native-run.sh
org.meshtastic.meshtasticd.desktop Add Meshtastic Linux desktop metadata (#6568) 2025-04-11 15:54:53 -05:00
org.meshtastic.meshtasticd.metainfo.xml automated bumps (#7293) 2025-07-10 11:31:40 -05:00
org.meshtastic.meshtasticd.svg Add Meshtastic Linux desktop metadata (#6568) 2025-04-11 15:54:53 -05:00
platformio-custom.py Add customizable boot logo based on resolution (#7146) 2025-07-02 11:53:12 -07:00
promote-release.sh
read-system-info.sh
readprops.py meshtasticd-debian: Fix versioning compliance, add OBS (#5785) 2025-01-07 17:16:56 -06:00
regen-protos.bat [Task]: 2.6 device-install scripts (#6248) 2025-03-06 16:58:08 -06:00
regen-protos.sh
rpkg.macros Update web, use centrally defined version (#6500) 2025-04-08 09:09:23 -05:00
s140_nrf52_7.3.0_softdevice.hex
setup-python-for-esp-debug.sh
test-simulator.sh
uf2-convert.bat [Task]: 2.6 device-install scripts (#6248) 2025-03-06 16:58:08 -06:00
uf2conv.py fix python warning in uf2conf (#4235) 2024-07-09 07:19:03 -05:00
update-lilygo_techo_bootloader-0.6.1_nosd.uf2
view-map.sh Use /usr/bin/env in bash and python script shebangs 2022-01-07 02:53:33 -08:00
web.version chore(deps): update meshtastic/web to v2.6.4 (#7017) 2025-06-26 12:39:03 -05:00
wio_tracker_bootloader_update.bin