Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local files = { };
- if fs.exists("buildTest") then
- table.insert(files, "buildTest");
- end
- if fs.exists("/apis/ut") then
- table.insert(files, "/apis/ut");
- end
- if fs.exists("/apis/myturtle") then
- table.insert(files, "/apis/myturtle");
- end
- if fs.exists("/apis/tcmodules") then
- table.insert(files, "/apis/tcmodules");
- end
- if fs.exists("/apis/builderapi") then
- table.insert(files, "/apis/builderapi");
- end
- if 0 < #files then
- for _, val in ipairs(files) do
- print(val);
- end
- print(tostring(#files) .. " file(s) exists.");
- print("overwrite? (y/n)");
- local ch = read();
- if ch ~= "y" then
- print("Installation was canceled.");
- return;
- end
- for _, val in ipairs(files) do
- fs.delete(val);
- end
- end
- if fs.exists("/apis") then
- if not fs.isDir("/apis") then
- error("A file 'apis' exists. Processing was stopped.")
- else
- fs.makeDir("/apis")
- end
- end
- print("Installing...");
- shell.run("pastebin get CGkq6EzA buildTest");
- shell.run("pastebin get W3ucmrSs /apis/ut");
- shell.run("pastebin get ypvNTHAj /apis/myturtle");
- shell.run("pastebin get sTP9jiWL /apis/tcmodules");
- shell.run("pastebin get fshSfR8C /apis/builderapi");
- print("Installation was completed.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement