mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
build: Take a lock on the package download directory
This commit is contained in:
parent
5704075605
commit
dc12bbd8a6
@ -32,7 +32,7 @@ if [ -n "$PKG_URL" ]; then
|
||||
|
||||
# Avoid concurrent downloads of the same package
|
||||
_isblocked=N
|
||||
exec 99>$SOURCES/$1/.lock
|
||||
exec 99<$SOURCES/$1
|
||||
while ! flock --nonblock --exclusive 99; do
|
||||
[ ${_isblocked} == N ] && { echo "Project ${PROJECT} waiting to avoid concurrent download of ${1}..."; _isblocked=Y; }
|
||||
sleep 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user