-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstallOreProc.lua
More file actions
34 lines (34 loc) · 1.63 KB
/
Copy pathinstallOreProc.lua
File metadata and controls
34 lines (34 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
local file = io.open("/home/NIDAS/configuration/menu.lua", "r")
local fileContent = {}
for line in file:lines() do
table.insert(fileContent, line)
end
io.close()
if fileContent[21] ~= " {name = \"Ore Processing\", module = \"modules.tools.OreProcessing\", desc = descriptions.OreProcessing}" then
fileContent[20] = fileContent[20]..","
table.insert(fileContent, 21, " {name = \"Ore Processing\", module = \"modules.tools.OreProcessing\", desc = descriptions.OreProcessing}")
file = io.open("/home/NIDAS/configuration/menu.lua", "w")
for k, v in ipairs(fileContent) do
file:write(v.."\n")
end
io.close(file)
end
fileContent = {}
file = io.open("/home/NIDAS/configuration/descriptions.lua", "r")
if file then
for line in file:lines() do
table.insert(fileContent, line)
end
end
--fileContent.descriptions.OreProcessing = "Automatically sorts incoming ores into their respective configurable ore processing lines."
if fileContent[8] ~= " OreProcessing = \"Automatically sorts incoming ores into their respective configurable ore processing lines.\"" then
fileContent[7] = fileContent[7]..","
table.insert(fileContent, 8, " OreProcessing = \"Automatically sorts incoming ores into their respective configurable ore processing lines.\"")
file = io.open("/home/NIDAS/configuration/descriptions.lua", "w")
for k, v in ipairs(fileContent) do
file:write(v.."\n")
end
io.close(file)
end
require("shell").execute("wget https://raw.githubusercontent.com/Aurastorm/NIDAS-Ore-Processing/main/OreProcessing.lua /home/NIDAS/modules/tools/OreProcessing.lua -f")
require("computer").shutdown(true)