made sha a require-style lib
This commit is contained in:
parent
da62de5514
commit
9bbaf67696
@ -15,7 +15,7 @@ modules/net/copper.lua
|
|||||||
modules/util/motd.lua
|
modules/util/motd.lua
|
||||||
modules/lib/readline.lua
|
modules/lib/readline.lua
|
||||||
modules/lib/shutil.lua
|
modules/lib/shutil.lua
|
||||||
modules/lib/sha256.lua
|
libwrap sha modules/lib/sha256.lua
|
||||||
modules/lib/userlib.lua
|
modules/lib/userlib.lua
|
||||||
modules/net/net-ext.lua
|
modules/net/net-ext.lua
|
||||||
modules/applications/login.lua
|
modules/applications/login.lua
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local tA = {...}
|
local tA = {...}
|
||||||
local si =
|
local si =
|
||||||
spawn("lua shell",function()
|
spawn("lua shell",function()
|
||||||
|
_ENV = shutil.genenv()
|
||||||
coroutine.yield()
|
coroutine.yield()
|
||||||
log(login())
|
log(login())
|
||||||
print("\f"..MOTD)
|
print("\f"..MOTD)
|
||||||
@ -38,7 +39,7 @@ spawn("lua shell",function()
|
|||||||
if inp:sub(1,1) == "=" then
|
if inp:sub(1,1) == "=" then
|
||||||
inp="return "..inp:sub(2)
|
inp="return "..inp:sub(2)
|
||||||
end
|
end
|
||||||
local r={pcall(load(inp))}
|
local r={pcall(load(inp,_ENV))}
|
||||||
if r[1] == true then
|
if r[1] == true then
|
||||||
table.remove(r,1)
|
table.remove(r,1)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user