summaryrefslogtreecommitdiffstats
path: root/scripts/cp-noerror
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cp-noerror')
-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 @@
1#!/usr/bin/env python
2#
3# Allow copying of $1 to $2 but if files in $1 disappear during the copy operation,
4# don't error.
5#
6
7import sys
8import shutil
9
10try:
11 shutil.copytree(sys.argv[1], sys.argv[2])
12except shutil.Error:
13 pass
14
15