Modified WebInstall. Also reverted version to v1.0.1 which was mistakenly increased.
This commit is contained in:
@@ -4,7 +4,7 @@ A universal, customizable and feature-packed operating system for OpenComputers.
|
|||||||
## Installation
|
## Installation
|
||||||
To install Halyde from OpenOS, simply run:
|
To install Halyde from OpenOS, simply run:
|
||||||
|
|
||||||
`pastebin run xBtk6bFi`
|
`pastebin run cwir7NH5`
|
||||||
|
|
||||||
If for some reason that doesn't work, try:
|
If for some reason that doesn't work, try:
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
local loadfile = ...
|
local loadfile = ...
|
||||||
local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile)
|
local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile)
|
||||||
|
|
||||||
_G._OSVERSION = "Halyde 1.0.2"
|
_G._OSVERSION = "Halyde 1.0.1"
|
||||||
|
|
||||||
function _G.import(module, ...)
|
function _G.import(module, ...)
|
||||||
local args = table.pack(...)
|
local args = table.pack(...)
|
||||||
|
|||||||
+26
-11
@@ -54,12 +54,7 @@ end
|
|||||||
|
|
||||||
-- installation
|
-- installation
|
||||||
local computer = require("computer")
|
local computer = require("computer")
|
||||||
local oldFiles = {}
|
|
||||||
for oldFile in fs.list(installLocation) do
|
|
||||||
if oldFile ~= "home/" then
|
|
||||||
table.insert(oldFiles, oldFile)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local function getFile(url)
|
local function getFile(url)
|
||||||
local request, data, tmpdata = nil, "", nil
|
local request, data, tmpdata = nil, "", nil
|
||||||
local status, errorMessage = pcall(function()
|
local status, errorMessage = pcall(function()
|
||||||
@@ -112,14 +107,31 @@ local function getFile(path)
|
|||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
print("a")
|
|
||||||
local webInstallConfig = getFile("https://raw.githubusercontent.com/Team-Cerulean-Blue/Halyde/refs/heads/main/argentum.cfg")
|
local webInstallConfig = getFile("https://raw.githubusercontent.com/Team-Cerulean-Blue/Halyde/refs/heads/main/argentum.cfg")
|
||||||
print("a")
|
|
||||||
webInstallConfig = load(webInstallConfig)
|
webInstallConfig = load(webInstallConfig)
|
||||||
print("a")
|
|
||||||
webInstallConfig = webInstallConfig()
|
webInstallConfig = webInstallConfig()
|
||||||
print("a")
|
local installationOrder = {"halyde", "edit", "argentum"}
|
||||||
installationOrder = {"halyde", "edit", "argentum"}
|
local oldFiles = {}
|
||||||
|
for oldFile in fs.list(installLocation) do
|
||||||
|
local usedFlag = false
|
||||||
|
for i = 1, 3 do
|
||||||
|
for _, file in pairs(webInstallConfig[installationOrger[i]].files) do
|
||||||
|
if oldFile == file then
|
||||||
|
usedFlag = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if webInstallConfig[installationOrger[i]].directories then
|
||||||
|
for _, dir in pairs(webInstallConfig[installationOrger[i]].directories) do
|
||||||
|
if oldFile == dir .. "/" then
|
||||||
|
usedFlag = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not usedFlag then
|
||||||
|
table.insert(oldFiles, oldFile)
|
||||||
|
end
|
||||||
|
end
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local webInstallConfig = webInstallConfig[installationOrder[i]]
|
local webInstallConfig = webInstallConfig[installationOrder[i]]
|
||||||
print("a")
|
print("a")
|
||||||
@@ -136,5 +148,8 @@ for i = 1, 3 do
|
|||||||
handle:close()
|
handle:close()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
for _, oldFile in pairs(oldFiles) do
|
||||||
|
fs.remove(oldFile)
|
||||||
|
end
|
||||||
computer.setBootAddress(component.get(installLocation:sub(6, -2)))
|
computer.setBootAddress(component.get(installLocation:sub(6, -2)))
|
||||||
computer.shutdown(true)
|
computer.shutdown(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user