Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local dirs = { "abm", "apis", "os" }
- local files = {
- "https://github.com/acharluk/ACharLuk-s-Boot-Manager/raw/master/abm/abm.lua",
- "https://github.com/acharluk/ACharLuk-s-Boot-Manager/raw/master/abm/configuration.cfg",
- "https://github.com/acharluk/ACharLuk-s-Boot-Manager/raw/master/abm/ABMcreator.lua",
- "https://github.com/acharluk/ACharLuk-s-Boot-Manager/raw/master/startup",
- "https://github.com/acharluk/ACharLuk-s-Boot-Manager/raw/master/apis/acl"
- }
- local filesLoc = {
- "abm/abm.lua",
- "abm/configuration.cfg",
- "abm/ABMcreator.lua",
- "startup",
- "apis/acl"
- }
- function createDir(dir)
- print(dir)
- if not fs.exists(dir) then
- print("Creating dir: "..dir)
- fs.makeDir(dir)
- return
- end
- end
- function getFile(url, location)
- dl = http.get(url)
- data = dl.readAll()
- dl.close()
- f = fs.open(location, "w")
- f.write(data)
- f.close()
- end
- function main()
- if not http then print("HTTP is not enabled, exiting") return end
- print("Installing ABM")
- print("Creating directories")
- for i = 1, #dirs do
- createDir(dirs[i])
- end
- print("Finished creating directories")
- print("Downloading required files")
- for i = 1, #files do
- print("Now downloading: "..files[i])
- print("Saving to: "..filesLoc[i])
- getFile(files[i], filesLoc[i])
- end
- print("Finished downloading required files")
- print("Please reboot to start ABM")
- print("Successfully installed ABM")
- end
- local ok, err = pcall(main)
- if not ok then
- print(err)
- end
Advertisement
Add Comment
Please, Sign In to add comment