3 REAL_RSYNC=/usr/bin/rsync
5 IGNOREOUT='^(file has vanished: |rsync warning: some files vanished before they could be transferred)'
7 # If someone installs this as "rsync", make sure we don't affect a server run.
9 if [[ "$arg" == --server ]]; then
10 exec $REAL_RSYNC "${@}"
17 # This filters stderr without merging it with stdout:
18 { $REAL_RSYNC "${@}" 2>&1 1>&3 3>&- | grep -E -v "$IGNOREOUT"; ret=${PIPESTATUS[0]}; } 3>&1 1>&2
20 if [[ $ret == $IGNOREEXIT ]]; then