44 lines
No EOL
1.1 KiB
Text
44 lines
No EOL
1.1 KiB
Text
local tArgs = {...}
|
|
local err = true
|
|
local sil = false
|
|
local function findArg(arg)
|
|
for _,v in ipairs(tArgs) do
|
|
if v == arg then
|
|
return true
|
|
end
|
|
end
|
|
return false
|
|
end
|
|
|
|
if findArg("-s") or findArg("--silent") then
|
|
sil = true
|
|
end
|
|
if findArg("-c:SYSTEM_CACHE") or findArg("--cache:SYSTEM_CACHE") then
|
|
err = false
|
|
if not sil then
|
|
kerneldraw.printBootInfo("Reloading system library cache")
|
|
kerneldraw.printBootWarning("Loading system libraries")
|
|
else
|
|
kernel.writeSyslog("Reloading system library cache")
|
|
kernel.writeSyslog("Loading system libraries")
|
|
end
|
|
kernel.loadSysLibs()
|
|
end
|
|
if findArg("-c:USER_CACHE") or findArg("--cache:USER_CACHE") then
|
|
err = false
|
|
if not sil then
|
|
kerneldraw.printBootInfo("Reloading user library cache")
|
|
kerneldraw.printBootWarning("Loading user libraries")
|
|
else
|
|
kernel.writeSyslog("Reloading user library cache")
|
|
kernel.writeSyslog("Loading user libraries")
|
|
end
|
|
kernel.loadUsrLibs()
|
|
end
|
|
if #tArgs < 1 then
|
|
kerneldraw.printAppInfo("asm-reload", "Arguments not specified")
|
|
return
|
|
elseif err then
|
|
kerneldraw.printAppInfo("asm-reload", "Specify cache to reload")
|
|
return
|
|
end |