made sha a require-style lib

This commit is contained in:
Izaya 2017-09-13 13:36:56 +10:00
parent da62de5514
commit 9bbaf67696
2 changed files with 3 additions and 2 deletions

View File

@ -15,7 +15,7 @@ modules/net/copper.lua
modules/util/motd.lua
modules/lib/readline.lua
modules/lib/shutil.lua
modules/lib/sha256.lua
libwrap sha modules/lib/sha256.lua
modules/lib/userlib.lua
modules/net/net-ext.lua
modules/applications/login.lua

View File

@ -1,6 +1,7 @@
local tA = {...}
local si =
spawn("lua shell",function()
_ENV = shutil.genenv()
coroutine.yield()
log(login())
print("\f"..MOTD)
@ -38,7 +39,7 @@ spawn("lua shell",function()
if inp:sub(1,1) == "=" then
inp="return "..inp:sub(2)
end
local r={pcall(load(inp))}
local r={pcall(load(inp,_ENV))}
if r[1] == true then
table.remove(r,1)
end