File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ # SPDX-FileCopyrightText: 2026 Core Devices LLC
3+ # SPDX-License-Identifier: Apache-2.0
4+
5+ import sys
6+ import urllib .request
7+
8+ if len (sys .argv ) < 3 :
9+ print ("Usage: download_firmware.py <board> <version> [slot]" )
10+ print ("Example: download_firmware.py asterix 4.9.121" )
11+ print ("Example: download_firmware.py getafix_dvt 4.9.121 0" )
12+ sys .exit (1 )
13+
14+ board = sys .argv [1 ]
15+ version = sys .argv [2 ]
16+ slot = sys .argv [3 ] if len (sys .argv ) > 3 else None
17+
18+ # Build filename and URL
19+ if slot :
20+ filename = f"firmware_{ board } _v{ version } _slot{ slot } .elf"
21+ else :
22+ filename = f"firmware_{ board } _v{ version } .elf"
23+
24+ url = f"https://github.com/coredevices/PebbleOS/releases/download/v{ version } /{ filename } "
25+
26+ print (f"Downloading { filename } ..." )
27+ urllib .request .urlretrieve (url , filename )
28+ print (f"Saved to { filename } " )
You can’t perform that action at this time.
0 commit comments