7""" Copies paths, creates if they do not exist.
21 dir_name, _ = os.path.split(path)
22 if not os.path.exists(dir_name):
27 return s1.st_ino == s2.st_ino
and s1.st_dev == s2.st_dev
31 if not os.path.exists(f2):
41 shutil.copytree(src, dst)
42 except OSError
as exc:
43 if exc.errno == errno.ENOTDIR:
45 shutil.copyfile(src, dst)
51 parser = argparse.ArgumentParser()
53 parser.add_argument(
'--file-list', dest=
'file_list', action=
'store', required=
True)
55 args = parser.parse_args()
57 files = open(args.file_list,
'r')
58 files_to_copy = files.read().split()
59 num_files =
len(files_to_copy) // 2
61 for i
in range(num_files):
62 CopyPath(files_to_copy[i], files_to_copy[num_files + i])
67if __name__ ==
'__main__':
def EnsureParentExists(path)