From fa69c0f5988b6c4254ebbefb243cbdaf596bfbdf Mon Sep 17 00:00:00 2001 From: bursa-pastoris Date: Sat, 7 May 2022 18:28:54 +0200 Subject: [PATCH] Print info about progress --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index 559533b..247cc0a 100755 --- a/main.py +++ b/main.py @@ -27,17 +27,21 @@ def main(): if len(files) == 0: # If path is a directory, create the directory in the restore path if not os.path.exists(path.replace(FROM_MULTIVOL,TO,1)): + print("Restoring path \"{}\"... ".format(path), end="") os.mkdir(path.replace(FROM_MULTIVOL,TO,1)) # The triple for the directory is generated before the triples # for any of its subdirectories, so parents of current path # will always exist + print("Done") if len(dirs) == 0: # If path is a file, recreate it the destination path + print("Restoring file \"{}\"... ".format(path), end="") os.system('find "{path_to_find}" -type f -print0 | sort -zV | xargs -0 cat - > "{path_to_cat_to}"' .format(path_to_find=path, path_to_cat_to=path.replace(FROM_MULTIVOL,TO,1) ) ) + print("Done") if __name__ == '__main__':