Commit cd0130b0 authored by ulrich_y's avatar ulrich_y
Browse files

Define a function for deep tarring

parent a4958685
......@@ -191,12 +191,16 @@ def backup_main(parsed):
else:
fp = parsed.o
tardir(fp, parsed.dir, compr, level)
def tardir(fp, folder, compr, level):
pcompr = subprocess.Popen([
compr, '-' + level
], stdout=fp, stdin=subprocess.PIPE)
ptar = subprocess.Popen([
"tar", "cvf", '-', parsed.dir
"tar", "cvf", '-', folder
], stdout=pcompr.stdin)
ptar.wait()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment