13 lines
336 B
Lua
13 lines
336 B
Lua
|
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()
|