summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2014-01-01 10:35:08 -0800
committerWayne Davison <wayned@samba.org>2014-01-01 10:35:08 -0800
commit1b29458ea404da41dfb8b668351909be1221a6e9 (patch)
tree65430c9a4c2ae9f9d7d794a928f1312d429b1de5
parentd3414a7d239413ef9b1110189bbad25f29d0f652 (diff)
downloadrsync-1b29458ea404da41dfb8b668351909be1221a6e9.tar.gz
Adding rsync-no-vanished script for bug 10356.
-rwxr-xr-xsupport/rsync-no-vanished15
1 files changed, 15 insertions, 0 deletions
diff --git a/support/rsync-no-vanished b/support/rsync-no-vanished
new file mode 100755
index 00000000..1cce75cb
--- /dev/null
+++ b/support/rsync-no-vanished
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+IGNOREEXIT=24
+IGNOREOUT='^(file has vanished: |rsync warning: some files vanished before they could be transferred)'
+
+set -o pipefail
+
+rsync "${@}" 2>&1 | (egrep -v "$IGNOREOUT" || true)
+ret=$?
+
+if [[ $ret == $IGNOREEXIT ]]; then
+ ret=0
+fi
+
+exit $ret