19 lines
552 B
Lua
19 lines
552 B
Lua
|
|
--fetch sync script
|
|
local repo = "https://git.brulijam.com/brulijam/Computercraft/raw/branch/main/src"
|
|
getRequest = http.get(repo .. "/main/programs/sync.lua")
|
|
file = fs.open("/main/programs/sync.lua", "w")
|
|
file.write(getRequest.readAll())
|
|
file.close()
|
|
|
|
--execute sync script
|
|
shell.run("/main/programs/sync.lua")
|
|
|
|
--task.lua contains stuff that should be done after boot
|
|
if not (fs.exists("main/task.lua")) then
|
|
file = fs.open("main/task.lua", "a")
|
|
file.writeLine("--use this file to execute programs")
|
|
file.close()
|
|
end
|
|
shell.run("main/task.lua")
|