Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
49ba41bf
Verified
Commit
49ba41bf
authored
Jul 29, 2021
by
Evangelos Foutras
🐱
Browse files
syncarchive: Tweak rsync options and drop temp dir
This reflects the recent changes made to syncrepo.
parent
4fe427a2
Pipeline
#9991
passed with stage
in 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
roles/syncarchive/files/syncarchive
View file @
49ba41bf
#!/bin/bash
target
=
"/srv/archive"
tmp
=
"/srv/syncarchive-tmp"
lock
=
"/var/lock/syncarchive.lck"
source_url
=
'rsync://rsync.archlinux.org/archive'
lastupdate_url
=
'https://archive.archlinux.org/repos/last/lastupdate'
[
!
-d
"
${
target
}
"
]
&&
mkdir
-p
"
${
target
}
"
[
!
-d
"
${
tmp
}
"
]
&&
mkdir
-p
"
${
tmp
}
"
exec
9>
"
${
lock
}
"
flock
-n
9
||
exit
rsync_cmd
()
{
local
-a
cmd
=(
rsync
-r
t
lH
--safe-links
--delete-
after
${
VERBOSE
}
"--timeout=600"
"--contimeout=60"
-p
\
--
delay-updates
--no-motd
"--temp-dir=
${
tmp
}
"
)
local
-a
cmd
=(
rsync
-rl
pt
H
--safe-links
--delete-
delay
--delay-updates
"
--
timeout=600"
"--contimeout=60"
--no-motd
)
if
stty
&>/dev/null
;
then
cmd+
=(
-h
-v
--progress
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment