OC-PsychOS/modules/applications/genkernel.lua

18 lines
372 B
Lua

function genkernel(modlistf,kname)
local nk,f = "",io.open(modlistf,"rb")
nk=nk.."_OSVERSION=\"PsychOS "..(kname or "unknown").."\"\n"
nk=nk.."_BD=\""..os.date("%Y/%m/%d %H:%M %z").."\"\n"
local c=f:read("*a")
f:close()
n=1
for line in c:gmatch("[^\r\n]+") do
n=n+1
f=io.open(line,"rb")
if f then
nk=nk..f:read("*a")
f:close()
end
end
return nk
end