diff --git a/tools/multi-update.cmd b/tools/multi-update.cmd new file mode 100644 index 000000000..7fd1cf44e --- /dev/null +++ b/tools/multi-update.cmd @@ -0,0 +1,16 @@ +@echo off +SETLOCAL +SET FWPATH=c:\path\to\your\WLED\build_output\firmware +GOTO ESPS + +:UPDATEONE +IF NOT EXIST %FWPATH%\%2 GOTO SKIP + ping -w 1000 -n 1 %1 | find "TTL=" || GOTO SKIP + ECHO Updating %1 + curl -s -F "update=@%FWPATH%/%2" %1/update >nul +:SKIP +GOTO:EOF + +:ESPS +call :UPDATEONE 192.168.x.x firmware.bin +call :UPDATEONE .... diff --git a/tools/multi-update.sh b/tools/multi-update.sh new file mode 100644 index 000000000..40e26221f --- /dev/null +++ b/tools/multi-update.sh @@ -0,0 +1,19 @@ +#!/bin/bash +FWPATH=/path/to/your/WLED/build_output/firmware + +update_one() { +if [ -f $FWPATH/$2 ]; then + ping -c 1 $1 >/dev/null + PINGRESULT=$? + if [ $PINGRESULT -eq 0 ]; then + echo Updating $1 + curl -s -F "update=@${FWPATH}/$2" $1/update >/dev/null + return 0 + fi + return 1 +fi +} + +update_one 192.168.x.x firmware.bin +update_one 192.168.x.x firmware.bin +# ... \ No newline at end of file