luarocks wrapper: remove lock if failed

Luarocks wrapper used to keep lock dir not removed if luarocks process
failed. To run it again, the lock directory should have been removed
manually.
This commit is contained in:
Boris Nagaev 2016-10-23 02:20:26 +03:00
parent a042a228fa
commit 953d7c3f0c
1 changed files with 3 additions and 1 deletions

View File

@ -49,8 +49,10 @@ define $(PKG)_BUILD_SHARED
echo ' echo "Waiting for $(PREFIX)/$(TARGET)/lib/luarocks/lock.dir to lock"'; \
echo ' sleep 5'; \
echo 'done'; \
echo '"$(PREFIX)/$(TARGET)/bin/luarocks.lua" "$$@"'; \
echo 'result=0'; \
echo '"$(PREFIX)/$(TARGET)/bin/luarocks.lua" "$$@" || result=$$?'; \
echo 'rmdir "$(PREFIX)/$(TARGET)/lib/luarocks/lock.dir"'; \
echo 'exit $$result'; \
) \
> '$(PREFIX)/$(TARGET)/bin/luarocks'
chmod 0755 '$(PREFIX)/$(TARGET)/bin/luarocks'