summaryrefslogtreecommitdiff
path: root/support/rsync-no-vanished
diff options
context:
space:
mode:
Diffstat (limited to 'support/rsync-no-vanished')
-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