Ledger Nano X - The secure hardware wallet
SHARE
TWEET

tunnel2_installer

kssr3951 May 5th, 2018 (edited) 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local REQUIRED_FILES =
  2. {
  3.   { name = "tunnel2"      , pastebinCode = "JtBU4C3V" },
  4.   { name = "turtleMoveApi", pastebinCode = "PWFGMGRv" }
  5. }
  6. local files = { }
  7. for _, val in ipairs(REQUIRED_FILES) do
  8.   if fs.exists(val.name) then
  9.     table.insert(files, val.name)
  10.   end
  11. end
  12. if 0 < #files then
  13.   for _, val in ipairs(files) do
  14.     print(val)
  15.   end
  16.   print(tostring(#files) .. " file(s) exists.")
  17.   print("overwrite? (y/n)")
  18.   local ch = read()
  19.   if ch ~= "y" then
  20.     print("Installation was canceled.")
  21.     return
  22.   end  
  23.   for _, val in ipairs(files) do
  24.     fs.delete(val)
  25.   end
  26. end
  27. print("Installing...")
  28. for _, val in ipairs(REQUIRED_FILES) do
  29.   shell.run("pastebin get " .. val.pastebinCode .. " " .. val.name)
  30. end
  31. print("Installation was completed.")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top