Advertisement
pedrosgali

OC Repo Program

Jun 6th, 2014
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. local net = require("API/net")
  2. local comp = require("component")
  3. local gpu = comp.gpu
  4.  
  5. register("petesMachine", 100)
  6.  
  7. a = {...}
  8.  
  9. func = a[1]
  10. filename = a[2]
  11. filepath = a[3]
  12. version = a[4]
  13. installDir = a[5]
  14.  
  15. if func == "pull" then
  16.     pull(myName, filename)
  17. elseif func == "list" then
  18.     list = getRepoList()
  19.     for i = 1, #list do
  20.         print(i..". "..list[i])
  21.     end
  22. elseif func == "push" then
  23.     push(filepath, filename, version, installDir)
  24. else
  25.     old = gpu.getForeground()
  26.     gpu.setForeground(0xFF0000)
  27.     print("Usage: repo [function] [filename]")
  28.     gpu.setForeground(old)
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement