15 lines
387 B
Python
Executable file
15 lines
387 B
Python
Executable file
#!/usr/bin/python3
|
|
|
|
import json
|
|
import subprocess
|
|
import sys
|
|
|
|
def main(tree, input_dir, options):
|
|
filename = options["filename"]
|
|
|
|
subprocess.run(["tar", "-xzf", f"{input_dir}/{filename}", "-C", tree], stdout=subprocess.DEVNULL, check=True)
|
|
|
|
if __name__ == '__main__':
|
|
args = json.load(sys.stdin)
|
|
r = main(args["tree"], args["input_dir"], args["options"])
|
|
sys.exit(r)
|