22 lines
381 B
Lua
Executable file
22 lines
381 B
Lua
Executable file
#!/usr/bin/lua
|
|
local pt = require('pt')
|
|
|
|
function dump(t, fn, seen)
|
|
if t == nil then return end
|
|
|
|
local file = io.open(fn, "w")
|
|
if not file then
|
|
io.write("Failed opening ", fn, "\n")
|
|
return
|
|
end
|
|
|
|
local writer = function(...)
|
|
file:write(...)
|
|
end
|
|
seen = pt(t, writer, seen)
|
|
|
|
file:close()
|
|
return seen
|
|
end
|
|
|
|
dump(_G, '!_G.yml')
|