12 lines
324 B
Python
Executable file
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))
|