Advertisement
Vladg24

OC-VGUI Installer

Nov 17th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. local filesystem = require("filesystem")
  2. local term = require("term")
  3. local component = require("component")
  4. local gpu = component.gpu;
  5.  
  6. if filesystem.get("bin/edit.lua") == nil or filesystem.get("bin/edit.lua").isReadOnly() then
  7.     error("Floppy disk filesystem detected: type \"install\" in command line and install OpenOS to your Hard Drive. After that run TermOS installer again.")
  8. else
  9.     gpu.setForeground(0x00FF00);
  10.     print("Downloading VGUI...\n")
  11.    
  12.     local url = "https://raw.githubusercontent.com/VladG24YT/OC-VGUI/master"
  13.     local files = {
  14.         updater = "/bin/updgui.lua",
  15.         gobject = "/lib/gobject.lua",
  16.         gcontainer = "/lib/gcontainer.lua",
  17.         gcomponent = "/lib/gcomponent.lua",
  18.         gcolorapi = "/lib/GColorAPI.lua",
  19.     }
  20.  
  21.     for key, value in pairs(files) do
  22.         term.write("Downloading "..key..": "..url..value.." -> "..value)
  23.         loadfile("/bin/wget.lua")(url..value, value, "-fq")
  24.     end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement