summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cp-noerror15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/cp-noerror b/scripts/cp-noerror
new file mode 100755
index 0000000000..fdb3d2d19a
--- /dev/null
+++ b/scripts/cp-noerror
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+#
+# Allow copying of $1 to $2 but if files in $1 disappear during the copy operation,
+# don't error.
+#
+
+import sys
+import shutil
+
+try:
+ shutil.copytree(sys.argv[1], sys.argv[2])
+except shutil.Error:
+ pass
+
+