debian-forge/stages/io.weldr.targz
Tom Gundersen 35917303c8 stages/targz: add a targz stage
This generates a tarball of the tree.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-06-12 18:55:49 +02:00

12 lines
324 B
Python
Executable file

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