summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2016-10-22 23:20:26 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2016-10-27 20:18:38 (GMT)
commit953d7c3f0c85564466048853171742b372d98694 (patch)
treedbf0b5ca361e1cd4c38d71946b00ee112cf4aefd
parenta042a228fabbf34936072aa60b43f6b203cfa417 (diff)
downloadmxe-953d7c3f0c85564466048853171742b372d98694.zip
mxe-953d7c3f0c85564466048853171742b372d98694.tar.gz
mxe-953d7c3f0c85564466048853171742b372d98694.tar.bz2
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.
-rw-r--r--plugins/luarocks/luarocks.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/luarocks/luarocks.mk b/plugins/luarocks/luarocks.mk
index 35ddb04..75bfc02 100644
--- a/plugins/luarocks/luarocks.mk
+++ b/plugins/luarocks/luarocks.mk
@@ -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'