File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ @ echo off
2+ SETLOCAL
3+ SET FWPATH = c:\path\to\your\WLED\build_output\firmware
4+ GOTO ESPS
5+
6+ :UPDATEONE
7+ IF NOT EXIST %FWPATH% \%2 GOTO SKIP
8+ ping -w 1000 -n 1 %1 | find " TTL=" || GOTO SKIP
9+ ECHO Updating %1
10+ curl -s -F " update=@%FWPATH% /%2 " %1 /update > nul
11+ :SKIP
12+ GOTO :EOF
13+
14+ :ESPS
15+ call :UPDATEONE 192.168.x.x firmware.bin
16+ call :UPDATEONE ....
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ FWPATH=/path/to/your/WLED/build_output/firmware
3+
4+ update_one () {
5+ if [ -f $FWPATH /$2 ]; then
6+ ping -c 1 $1 > /dev/null
7+ PINGRESULT=$?
8+ if [ $PINGRESULT -eq 0 ]; then
9+ echo Updating $1
10+ curl -s -F " update=@${FWPATH} /$2 " $1 /update > /dev/null
11+ return 0
12+ fi
13+ return 1
14+ fi
15+ }
16+
17+ update_one 192.168.x.x firmware.bin
18+ update_one 192.168.x.x firmware.bin
19+ # ...
You can’t perform that action at this time.
0 commit comments