eytixis

eytixis install programs v2 (opencomputers mod)

Sep 18th, 2020 (edited)
858
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local shell = require("shell")
  2. local term = require("term")
  3. local component = require("component")
  4. local filesystem = require("filesystem")
  5.  
  6. shell.execute("pastebin run S5msqP8t")
  7.  
  8. term.clear()
  9. term.setCursor(1,1)
  10.  
  11. for folder in pairs (FileListTable) do
  12.     if not filesystem.exists("//"..folder) then
  13.         shell.execute("mkdir //"..folder)
  14.     end
  15.     for filename, code in pairs(FileListTable[folder]) do
  16.         print("Installing "..filename.." in folder /"..folder)
  17.         shell.execute("rm //"..folder.."/"..filename)
  18.         shell.execute("pastebin get "..code.." //"..folder.."/"..filename)
  19.     end
  20. end
  21.  
  22. if (filesystem.exists("//lib/robot.lua")) then
  23.     for folder in pairs (FileListTableRobot) do
  24.         if not filesystem.exists("//"..folder) then
  25.             shell.execute("mkdir //"..folder)
  26.         end
  27.         for filename, code in pairs(FileListTableRobot[folder]) do
  28.             print("Installing "..filename.." in folder /"..folder)
  29.             shell.execute("rm //"..folder.."/"..filename)
  30.             shell.execute("pastebin get "..code.." //"..folder.."/"..filename)
  31.         end
  32.     end
  33. end
  34.  
  35. print("Installation Complete!")
  36. print("A system reboot is recommended")
RAW Paste Data