tar: derive compression algorithm from the file name

This commit is contained in:
Martin Sehnoutka 2019-07-15 13:44:19 +02:00 committed by Lars Karlitski
parent 7ea901928d
commit 7a9925ec99

View file

@ -7,7 +7,7 @@ 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)
subprocess.run(["tar", "--auto-compress", "-cf", f"{output_dir}/{filename}", "-C", tree, "."], stdout=subprocess.DEVNULL, check=True)
if __name__ == '__main__':
args = json.load(sys.stdin)