flash_all.sh: download from firmware.json

This commit is contained in:
Adeeb Shihadeh
2024-08-21 11:57:30 -07:00
parent c90c718a23
commit 2e03eabbfe
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -46,6 +46,9 @@ def download_and_decompress(url, expected_hash, filename):
assert(sha256.hexdigest().lower() == expected_hash.lower())
def load_manifest(url):
if Path(url).is_file():
with open(url) as f:
return json.loads(f.read())
r = requests.get(url)
r.raise_for_status()
return json.loads(r.content.decode())