summaryrefslogtreecommitdiff
path: root/support/rsync-no-vanished
blob: 1cce75cbf02d47c117d2ea1f12b36ed45baa8e99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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