Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. local fs = require("filesystem")
  2.  
  3. local wget = loadfile("/bin/wget.lua")
  4.  
  5. local baseURL = "http://tryy3.se/opencomputers/"
  6. local installationFolder = "/home/bin"
  7. local jsonPastebin = "https://pastebin.com/raw/tUBRm5Bc"
  8. local pkg = "package-manager"
  9.  
  10. if not fs.exists(installationFolder .. "/" .. pkg) then
  11. fs.makeDirectory(installationFolder .. "/" .. pkg)
  12. end
  13.  
  14. if not fs.exists("/home/lib") then
  15. fs.makeDirectory("/home/lib")
  16. end
  17.  
  18. wget("-fq", jsonPastebin, "/home/lib/json.lua")
  19. wget("-fq", baseURL .. pkg .. "/main.lua", installationFolder .. "/" .. pkg .. "/main.lua")
  20. wget("-fq", baseURL .. pkg .. "/aliases.lua", installationFolder .. "/" .. pkg .. "/aliases.lua")
  21.  
  22. local file = io.open("/boot/99_".. pkg .. ".lua", "wb")
  23. file:write("dofile(\"" .. installationFolder .. "/".. pkg .. "/aliases.lua" .. "\")")
  24. file:close()
  25.  
  26. os.execute("lua " .. installationFolder .. "/".. pkg .. "/main.lua install package-manager")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement