diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/cp-noerror | 15 |
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 | |||
7 | import sys | ||
8 | import shutil | ||
9 | |||
10 | try: | ||
11 | shutil.copytree(sys.argv[1], sys.argv[2]) | ||
12 | except shutil.Error: | ||
13 | pass | ||
14 | |||
15 | |||