mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
fix: 更新GitHub资源链接为镜像站点
将原始GitHub资源链接替换为gh.catmak.name镜像站点,并修正分支名称从primary到main
This commit is contained in:
@@ -18,7 +18,7 @@ textutils.coloredPrint(colors.yellow,
|
|||||||
print("Checking for update...")
|
print("Checking for update...")
|
||||||
|
|
||||||
local http = require("http")
|
local http = require("http")
|
||||||
local base = "https://raw.githubusercontent.com/LeonMMcoset/LeonOS/primary/"
|
local base = "https://gh.catmak.name/https://raw.githubusercontent.com/Leonmmcoset/LeonOS/refs/heads/main/"
|
||||||
|
|
||||||
local Bhandle, Berr = http.get(base .. "data/computercraft/lua/bios.lua")
|
local Bhandle, Berr = http.get(base .. "data/computercraft/lua/bios.lua")
|
||||||
if not Bhandle then
|
if not Bhandle then
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ for i=1, #to_dl, 1 do
|
|||||||
local v = to_dl[i]
|
local v = to_dl[i]
|
||||||
if v.type == "blob" then
|
if v.type == "blob" then
|
||||||
parallels[#parallels+1] = function()
|
parallels[#parallels+1] = function()
|
||||||
local data = dl("https://raw.githubusercontent.com/LeonMMcoset/LeonOS/primary/data/computercraft/lua/"..v.path)
|
local data = dl("https://gh.catmak.name/https://raw.githubusercontent.com/Leonmmcoset/LeonOS/refs/heads/main/data/computercraft/lua/"..v.path)
|
||||||
assert(io.open(v.real_path, "w")):write(data):close()
|
assert(io.open(v.real_path, "w")):write(data):close()
|
||||||
done = done + 1
|
done = done + 1
|
||||||
progress(pby, done, #to_dl)
|
progress(pby, done, #to_dl)
|
||||||
@@ -144,7 +144,7 @@ ok()
|
|||||||
assert(io.open(
|
assert(io.open(
|
||||||
fs.exists("/startup.lua") and "/unbios-rc.lua" or "/startup.lua", "w"))
|
fs.exists("/startup.lua") and "/unbios-rc.lua" or "/startup.lua", "w"))
|
||||||
:write(dl(
|
:write(dl(
|
||||||
"https://raw.githubusercontent.com/LeonMMcoset/LeonOS/primary/unbios.lua"
|
"https://gh.catmak.name/https://raw.githubusercontent.com/Leonmmcoset/LeonOS/refs/heads/main/unbios.lua"
|
||||||
)):close()
|
)):close()
|
||||||
|
|
||||||
tu.coloredPrint(colors.yellow, "Your computer will restart in 5 seconds.")
|
tu.coloredPrint(colors.yellow, "Your computer will restart in 5 seconds.")
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ end
|
|||||||
for i=1, #to_dl do
|
for i=1, #to_dl do
|
||||||
local v = to_dl[i]
|
local v = to_dl[i]
|
||||||
if v.type == "blob" and v.real_path ~= "unbios.lua" then
|
if v.type == "blob" and v.real_path ~= "unbios.lua" then
|
||||||
local data = dl("https://raw.githubusercontent.com/LeonMMcoset/LeonOS/primary/data/computercraft/lua/"..v.path)
|
local data = dl("https://gh.catmak.name/https://raw.githubusercontent.com/Leonmmcoset/LeonOS/refs/heads/main/data/computercraft/lua/"..v.path)
|
||||||
write(v.real_path)
|
write(v.real_path)
|
||||||
progress(i, #to_dl)
|
progress(i, #to_dl)
|
||||||
if v.real_path == "bios.lua" then
|
if v.real_path == "bios.lua" then
|
||||||
|
|||||||
Reference in New Issue
Block a user