debian-forge/assemblers/io.weldr.targz
Lars Karlitski 92f3af94f6 stage api: pass options in a separate key
This avoids name clashes between osbuild and stage options.
2019-06-16 12:07:27 +02:00

15 lines
395 B
Python
Executable file

#!/usr/bin/python3
import json
import subprocess
import sys
def main(tree, output_dir, options):
filename = options["filename"]
subprocess.run(["tar", "-czf", f"{output_dir}/{filename}", "-C", tree, "."], stdout=subprocess.DEVNULL, check=True)
if __name__ == '__main__':
args = json.load(sys.stdin)
r = main(args["tree"], args["output_dir"], args["options"])
sys.exit(r)