Merge pull request #1545 from LuaAndC/luarocks-remove-lockdir

luarocks wrapper: remove lock if failed
This commit is contained in:
Boris Nagaev 2016-10-28 00:19:05 +04:00 committed by GitHub
commit cc04403698
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'