a bit of cleaning
This commit is contained in:
parent
333cac223a
commit
5a6018ad5e
@ -1,2 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
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)
|
function luash(si)
|
||||||
spawn("lua shell",function()
|
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)
|
print(_VERSION)
|
||||||
while true do
|
while true do
|
||||||
write("> ")
|
write("> ")
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
if component then
|
if component then
|
||||||
_G.Log = ""
|
_G.Log = ""
|
||||||
function log(...)
|
function log(...)
|
||||||
if component.list("ocemu")() then
|
|
||||||
for k,v in ipairs({...}) do
|
for k,v in ipairs({...}) do
|
||||||
|
if component.list("ocemu")() then
|
||||||
component.invoke(component.list("ocemu")(),"log",v)
|
component.invoke(component.list("ocemu")(),"log",v)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
Log=Log..tostring(v).."\n"
|
Log=Log..tostring(v).."\n"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
print=log
|
print=log
|
||||||
else log = print
|
else log = print
|
||||||
end
|
end
|
||||||
|
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)
|
kbd(ka)
|
||||||
end))
|
end))
|
||||||
luash()
|
luash()
|
||||||
|
computer.beep()
|
||||||
|
@ -23,10 +23,6 @@ replacements={
|
|||||||
{" %* ","*"},
|
{" %* ","*"},
|
||||||
{" \n","\n"},
|
{" \n","\n"},
|
||||||
{"%-%-.-\n",""},
|
{"%-%-.-\n",""},
|
||||||
{"coroutine%.","C."},
|
|
||||||
{"table%.","T."},
|
|
||||||
{"tostring","TS"},
|
|
||||||
{"tonumber","TN"},
|
|
||||||
}
|
}
|
||||||
for k,v in ipairs(replacements) do
|
for k,v in ipairs(replacements) do
|
||||||
while ss:find(v[1]) ~= nil do
|
while ss:find(v[1]) ~= nil do
|
||||||
|
Loading…
Reference in New Issue
Block a user