Adding rsync-no-vanished script for bug 10356.
authorWayne Davison <wayned@samba.org>
Wed, 1 Jan 2014 18:35:08 +0000 (10:35 -0800)
committerWayne Davison <wayned@samba.org>
Wed, 1 Jan 2014 18:35:08 +0000 (10:35 -0800)
support/rsync-no-vanished [new file with mode: 0755]

diff --git a/support/rsync-no-vanished b/support/rsync-no-vanished
new file mode 100755 (executable)
index 0000000..1cce75c
--- /dev/null
@@ -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