File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
share/github-backup-utils Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 20
20
done
21
21
fi
22
22
23
- # Rsync >=3.x sends errors to stderr, so we must combine with stdout before the pipe so we can grep properly.
24
23
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)
24
+ rsync_version_check=` rsync --version | egrep " version 2.[0-9]*.[0-9]*" `
25
+ if [ -z " $rsync_version_check " ]; then
26
+ # rsync >= 3.x sends errors to stderr. so, we need to redirect to stdout before the pipe
27
+ rsync " ${parameters[@]} " $GHE_EXTRA_RSYNC_OPTS 2>&1 | (egrep -v " $ignoreout " || true)
28
+ else
29
+ # rsync <3.x sends errors to stdout.
30
+ rsync " ${parameters[@]} " $GHE_EXTRA_RSYNC_OPTS | (egrep -v " $ignoreout " || true)
31
+ fi
26
32
res=$?
27
33
28
34
# Suppress exits with 24.
You can’t perform that action at this time.
0 commit comments