lgen.lua

changeset 21
3c71c525cec2
parent 9
751216807683
child 26
77cd7b8fb6a6
--- a/lgen.lua	Mon Jul 06 09:36:27 2020 -0500
+++ b/lgen.lua	Mon Jul 06 10:56:23 2020 -0500
@@ -1,7 +1,8 @@
 
-local path=string.gsub(arg[0], "(.*)/[^/]*", "%1");
-if path~=nil then
-    package.path=package.path .. ';' .. path .. '/?.lua'
+local lgen={}
+local lgen_path=string.gsub(arg[0], "(.*)/[^/]*", "%1");
+if lgen_path~=nil then
+    package.path=package.path .. ';' .. lgen_path .. '/?.lua'
 end
 
 -- Lua 5.1 setfenv/getfenv compatibility for Lua 5.2
@@ -39,6 +40,7 @@
         src=src,
         dst=dst,
         tmpl=tmpl,
+        lgen_location=lgen_path,
     },
     pages={
     },

mercurial