Advertisement
kssr3951

quickMiner installer

May 6th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local files = { };
  2. if fs.exists("quickMiner") then
  3.   table.insert(files, "quickMiner")
  4. end
  5. if fs.exists("beacon") then
  6.   table.insert(files, "beacon")
  7. end
  8.  if 0 < #files then
  9.   for _, val in ipairs(files) do
  10.     print(val)
  11.   end
  12.   print(tostring(#files) .. " file(s) exists.")
  13.   print("overwrite? (y/n)")
  14.   local ch = read()
  15.   if ch ~= "y" then
  16.     print("Installation was canceled.")
  17.     return
  18.   end  
  19.   for _, val in ipairs(files) do
  20.     fs.delete(val)
  21.   end
  22. end
  23. print("Installing...")
  24. shell.run("pastebin get RjsxGDTF quickMiner")
  25. shell.run("pastebin get hjGie0QG beacon")
  26. print("Installation was completed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement