a bit of cleaning
This commit is contained in:
parent
333cac223a
commit
5a6018ad5e
@ -1,2 +1,4 @@
|
||||
#!/bin/bash
|
||||
echo "_OSVERSION=\"PsychOS $(git rev-parse HEAD | head -c 8)\""
|
||||
echo "_BD=\"$(date '+%Y/%m/%d %H:%M %z')\""
|
||||
cat modules/debug/log.lua modules/base/header.lua modules/drivers/tty.lua modules/lib/print.lua modules/drivers/kbd.lua modules/drivers/net.lua modules/lib/readline.lua modules/applications/luash.lua modules/setup.lua modules/base/footer.lua
|
||||
|
@ -1,5 +1,7 @@
|
||||
function luash(si)
|
||||
spawn("lua shell",function()
|
||||
coroutine.yield()
|
||||
print(_OSVERSION..", "..string.format("%4d",computer.totalMemory()/1024).."K memory, "..string.format("%4d",computer.freeMemory()/1024).."K free")
|
||||
print(_VERSION)
|
||||
while true do
|
||||
write("> ")
|
||||
|
@ -1,12 +1,12 @@
|
||||
if component then
|
||||
_G.Log = ""
|
||||
function log(...)
|
||||
if component.list("ocemu")() then
|
||||
for k,v in ipairs({...}) do
|
||||
component.invoke(component.list("ocemu")(),"log",v)
|
||||
if component.list("ocemu")() then
|
||||
component.invoke(component.list("ocemu")(),"log",v)
|
||||
end
|
||||
Log=Log..tostring(v).."\n"
|
||||
end
|
||||
end
|
||||
Log=Log..tostring(v).."\n"
|
||||
end
|
||||
print=log
|
||||
else log = print
|
||||
|
3
modules/lib/computer-ext.lua
Normal file
3
modules/lib/computer-ext.lua
Normal file
@ -0,0 +1,3 @@
|
||||
function _G.computer.usedMemory()
|
||||
return computer.totalMemory()-computer.freeMemory()
|
||||
end
|
@ -4,3 +4,4 @@ local ka = component.list("keyboard")()
|
||||
kbd(ka)
|
||||
end))
|
||||
luash()
|
||||
computer.beep()
|
||||
|
Loading…
Reference in New Issue
Block a user