Compare commits
No commits in common. "0712210768921f06505711a2edc6da38ad61fc7a" and "05208810d3984cfac773bc6286aa8ead2bd031f9" have entirely different histories.
0712210768
...
05208810d3
1
build.sh
1
build.sh
@ -9,4 +9,3 @@ mv target/tinit.lua target/init.lua
|
|||||||
cp -r exec/ service/ lib/ target/
|
cp -r exec/ service/ lib/ target/
|
||||||
cp default-init.txt target/cfg/init.txt
|
cp default-init.txt target/cfg/init.txt
|
||||||
lua finddesc.lua $(find module/ -type f) $(find lib/ -type f) > apidoc.md
|
lua finddesc.lua $(find module/ -type f) $(find lib/ -type f) > apidoc.md
|
||||||
rm target/version.lua
|
|
||||||
|
@ -10,14 +10,6 @@ local function shindex(self,k)
|
|||||||
return _G[k]
|
return _G[k]
|
||||||
end
|
end
|
||||||
|
|
||||||
local function formatValue(v)
|
|
||||||
if type(v) == "table" then
|
|
||||||
local w, rs = pcall(serial.serialize,v)
|
|
||||||
if w then return rs end
|
|
||||||
end
|
|
||||||
return tostring(v)
|
|
||||||
end
|
|
||||||
|
|
||||||
function shell.interactive()
|
function shell.interactive()
|
||||||
local shenv = setmetatable({}, {__index=shindex})
|
local shenv = setmetatable({}, {__index=shindex})
|
||||||
local run = true
|
local run = true
|
||||||
@ -34,7 +26,16 @@ function shell.interactive()
|
|||||||
local rt = {pcall(f)}
|
local rt = {pcall(f)}
|
||||||
local rs = table.remove(rt,1)
|
local rs = table.remove(rt,1)
|
||||||
for k,v in pairs(rt) do
|
for k,v in pairs(rt) do
|
||||||
print(formatValue(v))
|
if type(v) == "table" then
|
||||||
|
local w, s = pcall(serial.serialize,v)
|
||||||
|
if w then
|
||||||
|
print(s)
|
||||||
|
else
|
||||||
|
print(tostring(v))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
print(tostring(v))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user