mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-06 20:47:00 +02:00
14 lines
326 B
Bash
Executable File
14 lines
326 B
Bash
Executable File
#!/usr/bin/python
|
|
|
|
import hashlib
|
|
import json
|
|
import os
|
|
import sys
|
|
|
|
path=sys.argv[1]
|
|
version=sys.argv[2]
|
|
|
|
with open(path, "rb") as f:
|
|
kernel = f.read()
|
|
print json.dumps({"9": {"binaryvalues": [{"prefix": "grub_linux", "values": [{"value": hashlib.sha1(kernel).hexdigest(), "description": "flatcar-%s" % version}]}]}})
|