mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +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
|
# Avoid concurrent downloads of the same package
|
||||||
_isblocked=N
|
_isblocked=N
|
||||||
exec 99>$SOURCES/$1/.lock
|
exec 99<$SOURCES/$1
|
||||||
while ! flock --nonblock --exclusive 99; do
|
while ! flock --nonblock --exclusive 99; do
|
||||||
[ ${_isblocked} == N ] && { echo "Project ${PROJECT} waiting to avoid concurrent download of ${1}..."; _isblocked=Y; }
|
[ ${_isblocked} == N ] && { echo "Project ${PROJECT} waiting to avoid concurrent download of ${1}..."; _isblocked=Y; }
|
||||||
sleep 1
|
sleep 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user