aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2025-03-05 01:32:44 -0300
committerHisham Muhammad <hisham@gobolinux.org>2025-03-10 10:51:05 -0300
commitc9608d66f802a36a6b6aeeb21a0aa5d263f1087b (patch)
tree38f444ffc4899db3cdec4aecacdb939f49e7cec3
parent8230b4d67aa84ae204d9774dd017cedf56faf9ce (diff)
downloadluarocks-c9608d66f802a36a6b6aeeb21a0aa5d263f1087b.tar.gz
luarocks-c9608d66f802a36a6b6aeeb21a0aa5d263f1087b.tar.bz2
luarocks-c9608d66f802a36a6b6aeeb21a0aa5d263f1087b.zip
[wip] generate .lua from .tl files
-rwxr-xr-xbootstrap.tl7
1 files changed, 7 insertions, 0 deletions
diff --git a/bootstrap.tl b/bootstrap.tl
index 4ea1896c..14124eb9 100755
--- a/bootstrap.tl
+++ b/bootstrap.tl
@@ -3,6 +3,8 @@
3local PLATFORM = arg[1] or "unix" 3local PLATFORM = arg[1] or "unix"
4 4
5local lfs = require("lfs") 5local lfs = require("lfs")
6--local tl = require("tl")
7--local tl_env = tl.new_env()
6 8
7local dependencies = { 9local dependencies = {
8 "md5", 10 "md5",
@@ -284,6 +286,11 @@ local function generate(input_filename: string, entry: Data.LuaEntry): string
284 local content = fd:read("*a"):gsub("^#![^\n]+\n", "") 286 local content = fd:read("*a"):gsub("^#![^\n]+\n", "")
285 fd:close() 287 fd:close()
286 288
289-- local tl_file = input_filename:gsub("%.lua$", ".tl")
290-- if lfs.attributes(tl_file) then
291-- content = assert(tl.gen(content, tl_env), "failed generating " .. tl_file)
292-- end
293
287 entry.length = #content 294 entry.length = #content
288 295
289 return apply_template([[ 296 return apply_template([[