mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
get: file lock changes
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
parent
022b549dac
commit
1c690c031a
@ -14,15 +14,11 @@ fi
|
||||
|
||||
# Avoid concurrent processing of the same package
|
||||
lock_source_dir() {
|
||||
local _isblocked=N
|
||||
exec 99<"${SOURCES}/${1}"
|
||||
while ! flock --nonblock --exclusive 99; do
|
||||
if [ ${_isblocked} = N ]; then
|
||||
if ! flock --nonblock --exclusive 99; then
|
||||
echo "Project/Device ${DEVICE:-${PROJECT}} waiting, to avoid concurrent processing of ${1}..."
|
||||
_isblocked=Y
|
||||
flock --exclusive 99
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
if [ -n "${PKG_URL}" -a -n "${PKG_SOURCE_NAME}" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user