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
dde2bb8a
Commit
dde2bb8a
authored
Feb 18, 2021
by
Jelle van der Waa
🚧
Browse files
Merge branch 'syncrepo_check' into 'master'
Lock before deleting files See merge request
!307
parents
f32f3995
73bf287a
Pipeline
#5277
passed with stage
in 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
roles/syncrepo/files/syncrepo-template.sh
View file @
dde2bb8a
...
...
@@ -59,12 +59,12 @@ lastupdate_url=''
[
!
-d
"
${
target
}
"
]
&&
mkdir
-p
"
${
target
}
"
[
!
-d
"
${
tmp
}
"
]
&&
mkdir
-p
"
${
tmp
}
"
# Cleanup any temporary files from old run that might remain.
find
"
${
target
}
"
-name
'.~tmp~'
-exec
rm
-r
{}
+
exec
9>
"
${
lock
}
"
flock
-n
9
||
exit
# Cleanup any temporary files from old run that might remain.
find
"
${
target
}
"
-name
'.~tmp~'
-exec
rm
-r
{}
+
rsync_cmd
()
{
local
-a
cmd
=(
rsync
-rtlH
--safe-links
--delete-after
${
VERBOSE
}
"--timeout=600"
"--contimeout=60"
-p
\
--delay-updates
--no-motd
"--temp-dir=
${
tmp
}
"
)
...
...
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