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
12
scripts/get
12
scripts/get
@ -14,15 +14,11 @@ fi
|
|||||||
|
|
||||||
# Avoid concurrent processing of the same package
|
# Avoid concurrent processing of the same package
|
||||||
lock_source_dir() {
|
lock_source_dir() {
|
||||||
local _isblocked=N
|
|
||||||
exec 99<"${SOURCES}/${1}"
|
exec 99<"${SOURCES}/${1}"
|
||||||
while ! flock --nonblock --exclusive 99; do
|
if ! flock --nonblock --exclusive 99; then
|
||||||
if [ ${_isblocked} = N ]; then
|
echo "Project/Device ${DEVICE:-${PROJECT}} waiting, to avoid concurrent processing of ${1}..."
|
||||||
echo "Project/Device ${DEVICE:-${PROJECT}} waiting, to avoid concurrent processing of ${1}..."
|
flock --exclusive 99
|
||||||
_isblocked=Y
|
fi
|
||||||
fi
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -n "${PKG_URL}" -a -n "${PKG_SOURCE_NAME}" ]; then
|
if [ -n "${PKG_URL}" -a -n "${PKG_SOURCE_NAME}" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user