assemblers: resurrect io.weldr.targz
This was dropped in cebed27cd. However, a tar of a tree is useful in its
own right as an output format.
This commit is contained in:
parent
34d620feea
commit
e9fb1ded15
1 changed files with 15 additions and 0 deletions
15
assemblers/io.weldr.targz
Executable file
15
assemblers/io.weldr.targz
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue