OC-MultICE/modules/util/sinit.lua

14 lines
234 B
Lua
Raw Normal View History

2017-05-15 17:18:15 +10:00
s("init",function()
2017-05-15 17:16:20 +10:00
local f=fopen("boot:/init.cfg","rb")
2017-05-15 17:18:15 +10:00
write("")
2017-05-15 17:16:20 +10:00
if f then
local c=freadall(f)
2017-05-15 17:18:15 +10:00
for l in c:gmatch("[^\n]+") do
write("[init] "..l..": ")
local pf=fload(l)
print(pcall(pf))
2017-06-13 09:42:00 +10:00
C.yield()
2017-05-15 17:18:15 +10:00
end
2017-05-15 17:16:20 +10:00
end
2017-06-13 09:42:00 +10:00
end)