We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4cf6b4f + ded29a6 commit c15c756Copy full SHA for c15c756
1 file changed
tests/rust/build.py
@@ -65,7 +65,23 @@ def cp(src, dst):
65
if not args.dry_run:
66
shutil.copy(src, dst)
67
68
+def rm_rf(dst):
69
+ if args.verbose:
70
+ print(f"rm -rf {dst}")
71
+ if not args.dry_run:
72
+ if dst.exists():
73
+ if dst.is_dir():
74
+ shutil.rmtree(dst)
75
+ else:
76
+ dst.unlink()
77
+
78
+ALREADY_COPIED = {}
79
def cp_R(src, dst):
80
+ if src in ALREADY_COPIED:
81
+ return
82
83
+ ALREADY_COPIED[src] = dst
84
+ rm_rf(dst)
85
if args.verbose:
86
print(f"cp -R {src} {dst}")
87
0 commit comments