Verified Commit 5704356c authored by Evangelos Foutras's avatar Evangelos Foutras 🐱
Browse files

syncrepo: Tweak rsync options

- Replace --delete-after with more efficient --delete-delay.
- Move "-p" together with the other short options.
- Remove reference to empty ${VERBOSE} variable.
parent 8dad3e85
...@@ -72,8 +72,8 @@ exec 9>"${lock}" ...@@ -72,8 +72,8 @@ exec 9>"${lock}"
flock -n 9 || exit flock -n 9 || exit
rsync_cmd() { rsync_cmd() {
local -a cmd=(rsync -rtlH --safe-links --delete-after ${VERBOSE} "--timeout=600" "--contimeout=60" -p \ local -a cmd=(rsync -rlptH --safe-links --delete-delay --delay-updates
--delay-updates --no-motd "--temp-dir=${tmp}") "--timeout=600" "--contimeout=60" --no-motd "--temp-dir=${tmp}")
if stty &>/dev/null; then if stty &>/dev/null; then
cmd+=(-h -v --progress) cmd+=(-h -v --progress)
......
...@@ -50,7 +50,7 @@ bwlimit=0 ...@@ -50,7 +50,7 @@ bwlimit=0
source_url='' source_url=''
# An HTTP(S) URL pointing to the 'lastupdate' file on your chosen mirror. # An HTTP(S) URL pointing to the 'lastupdate' file on your chosen mirror.
# If you are a tier 1 mirror use: http://rsync.archlinux.org/lastupdate # If you are a tier 1 mirror use: https://rsync.archlinux.org/lastupdate
# Otherwise use the HTTP(S) URL from your chosen mirror. # Otherwise use the HTTP(S) URL from your chosen mirror.
lastupdate_url='' lastupdate_url=''
...@@ -66,8 +66,8 @@ flock -n 9 || exit ...@@ -66,8 +66,8 @@ flock -n 9 || exit
find "${target}" -name '.~tmp~' -exec rm -r {} + find "${target}" -name '.~tmp~' -exec rm -r {} +
rsync_cmd() { rsync_cmd() {
local -a cmd=(rsync -rtlH --safe-links --delete-after ${VERBOSE} "--timeout=600" "--contimeout=60" -p \ local -a cmd=(rsync -rlptH --safe-links --delete-delay --delay-updates
--delay-updates --no-motd "--temp-dir=${tmp}") "--timeout=600" "--contimeout=60" --no-motd "--temp-dir=${tmp}")
if stty &>/dev/null; then if stty &>/dev/null; then
cmd+=(-h -v --progress) cmd+=(-h -v --progress)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment