Compare commits

..

2 Commits

Author SHA1 Message Date
10a2cd4880 update install 2025-12-23 21:28:47 -08:00
95734536f9 minifing 2025-12-23 21:28:05 -08:00
3 changed files with 32 additions and 8 deletions

Binary file not shown.

View File

@@ -1,5 +1,5 @@
local expect = require "cc.expect".expect
local base_url = "https://git.cadencoaster.com/Rivulet/ccde/raw/branch/main/"
local base_url = "https://git.cadencoaster.com/Rivulet/ccphone/raw/branch/main/"
local function download_to(path)
expect(2, path, "string")
term.write(path)
@@ -26,12 +26,12 @@ local filesystem = {
"global-libraries",
"apps-meta",
},
}
for _,i in ipairs(filesystem.dirs) do
}for _,i in ipairs(filesystem.dirs) do
print("making dir",i)
fs.makeDir(i)
end
for _,i in ipairs(filesystem.files) do
download_to(i)
end
shell.run("wget run https://raw.githubusercontent.com/Pyroxenium/Basalt2/main/install.lua -f /global-libraries/basalt.lua")

View File

@@ -51,8 +51,32 @@ local function format(scandata)
return format_data
end
local textdata = textutils.serialise(format(scan("/")))
local firstpart = ""
local secondpart = ""
local firstpart = [[local expect = require "cc.expect".expect
local base_url = "https://git.cadencoaster.com/Rivulet/ccphone/raw/branch/main/"
local function download_to(path)
expect(2, path, "string")
term.write(path)
if not http.checkURL(base_url..path) then error("URL is not valid" ,2) end
local data = http.get(base_url..path).readAll()
fs.makeDir(fs.getDir(path))
local file = fs.open(path,"w")
if not file then error("Failed to open file", 2) end
file.write(data)
file.close()
print(" OK")
end
local filesystem = ]]
local secondpart = [[
for _,i in ipairs(filesystem.dirs) do
print("making dir",i)
fs.makeDir(i)
end
for _,i in ipairs(filesystem.files) do
download_to(i)
end
shell.run("wget run https://raw.githubusercontent.com/Pyroxenium/Basalt2/main/install.lua -f /global-libraries/basalt.lua")]]
local outfile = fs.open("install.lua","w")
outfile.write()
outfile.write(firstpart..textdata..secondpart)
outfile.close()