Hi, list!

I've got a small executable Lua script (replaced by silly example below)

--- filename: bin/foobar
#! /usr/bin/env luajit2

print("run under luajit", not not jit)
---

I install it with a rockspec:

build = {
  type = "none",
  install = {
    bin = {
      "bin/foobar"
    }
  }
}

But when I run it, it reports that it does not run under LuaJIT!

After a hour of debugging, I've found this:

---
$ cat `which pk-call-lua-module`
#!/bin/sh

LUA_PATH="/usr/local/share/lua/5.1//?.lua;/usr/local/share/lua/5.1//?/init.lua;/home/agladysh/.luarocks/share/lua/5.1//?.lua;/home/agladysh/.luarocks/share/lua/5.1//?/init.lua;/usr/local/share/lua/5.1//?.lua;/usr/local/share/lua/5.1//?/init.lua;/usr/local/share/lua/5.1//?.lua;/usr/local/share/lua/5.1//?/init.lua;./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;$LUA_PATH"
LUA_CPATH="/usr/local/lib/lua/5.1//?.so;/home/agladysh/.luarocks/lib/lua/5.1//?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;$LUA_CPATH"
export LUA_PATH LUA_CPATH
exec "/usr/bin/lua" -lluarocks.loader
"/usr/local/lib/luarocks/rocks/foobar.module/scm-1/bin/foobar" "$@"
---

WTF?

If my script is a shell-script, then it is copied verbatim, but if it
is a Lua script, it is silently replaced by this monstrocity.

Why? And how to turn it off?

Alexander.

_______________________________________________
Luarocks-developers mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers

Reply via email to