matrix-send/COMPILE

35 lines
957 B
Text

___________________
< Manually building >
-------------------
Since matrix-send uses Lua, an interpreted programming language,
building is not necessary; you could just move matrix-send.lua to
/usr/local/bin and be done with it. However, for additional speed,
the Makefile precompiles it to Lua bytecode using
luac <https://www.lua.org/manual/5.4/luac.html> which is included
in the Lua distribution. To do this yourself, follow these steps:
=> Create the shebang
In order to be run by a shell, the compiled bytecode needs a
shebang at the start. To do this, run this command:
printf '#!/usr/bin/env lua\n' > matrix-send
=> Precompile
Now, let's append the bytecode to the file:
luac -o - matrix-send.lua >> matrix-send
=> Mark as an executable
Finally, mark the file as executable:
chmod +x matrix-send
The file `matrix-send` is now ready to be run by a shell.
# vi: ft=txt