forked from Niels1006/Level-Maintainer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstaller.lua
More file actions
24 lines (18 loc) · 729 Bytes
/
Copy pathinstaller.lua
File metadata and controls
24 lines (18 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
local shell = require("shell")
local filesystem = require("filesystem")
local scripts = {"AE2.lua", "Maintainer.lua", "rlist.lua"}
local function exists(filename)
return filesystem.exists(shell.getWorkingDirectory() .. "/" .. filename)
end
local repo = "https://raw.githubusercontent.com/lordIcocain/Level-Maintainer/";
local branch = "master"
for i = 1, #scripts do
if exists(scripts[i]) then
filesystem.remove(shell.getWorkingDirectory() .. "/" .. scripts[i]);
end
shell.execute(string.format("wget %s%s/%s %s", repo, branch, scripts[i], scripts[i]));
end
if not exists("MaintainerList") then
shell.execute(string.format("wget %s%s/MaintainerList", repo, branch));
end
shell.execute("reboot");