OC-MultICE/modules/util/sinit.lua

21 lines
398 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
2017-05-15 17:18:15 +10:00
local c=""
local nc=fread(f,2048)
while nc ~= nil and nc ~= "" do
c=c..nc
nc=fread(f,2048)
end
for l in c:gmatch("[^\n]+") do
write("[init] "..l..": ")
local pf=fload(l)
print(pcall(pf))
end
2017-05-15 17:16:20 +10:00
end
2017-05-15 17:18:15 +10:00
if _OSVERSION and _BD then
print("Started ".._OSVERSION.." (built at ".._BD..")")
2017-05-15 17:16:20 +10:00
end
2017-05-15 17:18:15 +10:00
end)