stream_layered_image: Add main method
This commit is contained in:
parent
307804d97d
commit
26402290bf
@ -181,8 +181,7 @@ def add_bytes(tar, path, content, mtime):
|
|||||||
tar.addfile(ti, io.BytesIO(content))
|
tar.addfile(ti, io.BytesIO(content))
|
||||||
|
|
||||||
|
|
||||||
# Main
|
def main():
|
||||||
|
|
||||||
with open(sys.argv[1], "r") as f:
|
with open(sys.argv[1], "r") as f:
|
||||||
conf = json.load(f)
|
conf = json.load(f)
|
||||||
|
|
||||||
@ -248,3 +247,7 @@ with tarfile.open(mode="w|", fileobj=sys.stdout.buffer) as tar:
|
|||||||
add_bytes(tar, "manifest.json", manifest_json, mtime=mtime)
|
add_bytes(tar, "manifest.json", manifest_json, mtime=mtime)
|
||||||
|
|
||||||
print("Done.", file=sys.stderr)
|
print("Done.", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user