Reputation: 11
Okay, so I was wondering if I could convert a .lua script to a Unix Executable with Mac OS X. Could that be possible? If so, how do I do it?
Upvotes: 0
Views: 273
Reputation: 72312
Adapted from the manual:
Lua scripts can be made into executable programs by using
chmod +x
and the#!
form, as in
#!/usr/local/bin/lua
The location of the Lua interpreter may be different in your machine. If lua is in your
PATH
then a more portable solution is
#!/usr/bin/env lua
Try also srlua for instance. It's a tool for building self-running Lua programs.
Upvotes: 2