File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
share/github-backup-utils Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,6 @@ set -o pipefail
1111# shellcheck source=share/github-backup-utils/ghe-backup-config
1212. " $( dirname " ${BASH_SOURCE[0]} " ) /ghe-backup-config"
1313
14- # Filter vanished file warnings from both stdout (rsync versions < 3.x) and
15- # stderr (rsync versions >= 3.x). The complex redirections are necessary to
16- # filter stderr while also keeping stdout and stderr separated.
17- ignoreout=' ^(file has vanished: |rsync warning: some files vanished before they could be transferred)'
18-
1914# Check for --ignore-missing-args parameter support and remove if unavailable.
2015if rsync -h | grep ' \-\-ignore-missing-args' > /dev/null 2>&1 ; then
2116 parameters=(" $@ " )
2520 done
2621fi
2722
28- (rsync " ${parameters[@]} " $GHE_EXTRA_RSYNC_OPTS 3>&1 1>&2 2>&3 3>& - |
29- (egrep -v " $ignoreout " || true)) 3>&1 1>&2 2>&3 3>& - |
30- (egrep -v " $ignoreout " || true)
23+ # Rsync >=3.x sends errors to stderr, so we must combine with stdout before the pipe so we can grep properly.
24+ ignoreout= ' ^(file has vanished: |rsync warning: some files vanished before they could be transferred) '
25+ rsync " ${parameters[@]} " $GHE_EXTRA_RSYNC_OPTS 2>&1 | (egrep -v " $ignoreout " || true)
3126res=$?
3227
3328# Suppress exits with 24.
You can’t perform that action at this time.
0 commit comments