fix disk output

This commit is contained in:
2020-08-29 21:30:26 +01:00
parent 47a00f74dc
commit 3998cbde6a
2 changed files with 10 additions and 4 deletions

View File

@@ -501,16 +501,22 @@ end
local disk_code_template = [[
settings.set("potatOS.gen_count", %d)
settings.set("potatOS.ancestry", %s)
settings.set("potatOS.distribution_server", %q)
settings.save ".settings"
shell.run "pastebin run RM13UGFa --hyperbolic-geometry --gdpr"
pcall(fs.delete, "startup")
shell.run %q
shell.run "startup"
]]
local function generate_disk_code()
local an = copy(ancestry)
table.insert(an, os.getComputerID())
local manifest = settings.get "potatOS.distribution_server" or "https://osmarks.tk/stuff/potatos/manifest"
return disk_code_template:format(
gen_count + 1,
textutils.serialise(an)
textutils.serialise(an),
manifest,
("wget %q startup"):format((registry.get "potatOS.current_manifest.base_URL" or manifest:gsub("/manifest$", "")) .. "/autorun.lua")
)
end