OC-PsychOS/genheader.lua

13 lines
336 B
Lua
Raw Normal View History

local f = io.open("header.lua","wb")
local kname = nil
if not _OSNAME then
local w,gn = pcall(io.popen,"git rev-parse HEAD")
if w then
kname = gn:read():sub(1,7)
gn:close()
end
end
f:write("_OSVERSION=\"PsychOS "..(kname or os.date("%Y/%m/%d %H:%M %z")).."\"\n")
f:write("_BD=\""..os.date("%Y/%m/%d %H:%M %z").."\"\n")
f:close()