This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
FREAX/etc/lib/tpm
2022-07-18 19:33:40 +02:00

25 lines
663 B
Text

function getPaste(file, id, overwrite)
if overwrite and fs.exists(file) and string.find(file, "system/") then
if fs.exists("/etc/.backups/"..file) then
fs.delete("/etc/.backups/"..file)
end
fs.copy(file, "/etc/.backups/"..file)
end
return kernel.getFile(file, "http://pastebin.com/raw/"..id, overwrite)
end
function downloadAPI(filename, id)
return getPaste("/usr/local/lib/"..filename, id, true)
end
function downloadBinary(filename, id)
return getPaste("/usr/local/bin/"..filename, id, true)
end
function toPackageAPI(filename)
return "/usr/local/lib/"..filename
end
function toPackageBinary(filename)
return "/usr/local/bin/"..filename
end