Advertisement
ben_mkiv

wirelessRedstone_installer.lua

Apr 21st, 2018
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. -- wirelessRedstone installer
  2. fs = require("filesystem")
  3.  
  4. files = {
  5.     { pastebin = "QPZZrQdS", path = "/usr/lib", filename = "borders.lua", label = "border/frame lib" },
  6.     { pastebin = "9Ujn0eEn", path = "/usr/lib", filename = "hazeUI.lua", label = "hazeUI lib" },
  7.     { pastebin = "8uKiRNHb", path = "/usr/lib", filename = "wirelessRedstone.lua", label = "wirelessRedstone lib" },
  8.     { pastebin = "TnxwEbt2", path = "/usr/lib", filename = "wirelessRedstoneGUI.lua", label = "wirelessRedstone GUI lib" },
  9.     { pastebin = "nTNrHUbs", path = "/usr/bin", filename = "wirelessRedstoneClient.lua", label = "wirelessRedstoneClient" },
  10.     { pastebin = "mYAQN1dv", path = "/usr/share/wirelessRedstone", filename = "wirelessRedstone_BIOS.lua", label = "wirelessRedstone BIOS" }
  11. }
  12.  
  13. function fetchFile(f)
  14.     local file = f.path .. "/" .. f.filename
  15.     if not fs.isDirectory(f.path) then fs.makeDirectory(f.path); end
  16.     if fs.exists(file) then fs.remove(file); end
  17.  
  18.     print("fetching "..f.label)
  19.     os.execute("pastebin get ".. f.pastebin .." " .. file)
  20. end
  21.  
  22.  
  23. for i=1,#files do
  24.     fetchFile(files[i])
  25.     os.sleep(0)
  26. end
  27.  
  28. print("\n...done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement