Volpe42

dialer client

Jun 20th, 2024
625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.38 KB | Gaming | 0 0
  1. local PREFIX = "https://raw.githubusercontent.com/Ktlo/pocket-stargate"
  2. local BRANCH = "develop"
  3.  
  4. --------------------------------
  5.  
  6. local function typeY()
  7.     write("Do you want to continue? (Type Y for continue): ")
  8.     local read = read(nil, nil, nil, "N")
  9.     if read ~= 'Y' then
  10.         print("Exiting...")
  11.         return true
  12.     end
  13. end
  14.  
  15. print("Installing PSG server...")
  16. print("Checking peripherals...")
  17. if not peripheral.find("modem", function(_, modem) return modem.isWireless() end) then
  18.     print("Wireless modem not found!")
  19.     if typeY() then return end
  20. end
  21. if not pocket then
  22.     print("This is not a pocket device!")
  23.     if typeY() then return end
  24. end
  25. print("Peripherals OK")
  26.  
  27. print("Downloading files...")
  28. local function wget(side, filename)
  29.     local fullUrl = PREFIX.."/"..BRANCH.."/"..side.."/"..filename
  30.     shell.execute("wget", fullUrl, filename)
  31. end
  32.  
  33. shell.execute("wget", "run", "https://basalt.madefor.cc/install.lua", "packed", "basalt.lua", "v1.6.6")
  34. wget("common", "concurrent.lua")
  35. wget("client", "addresses.conf")
  36. wget("client", "addresses.lua")
  37. wget("client", "stargate.lua")
  38. wget("client", "psg.lua")
  39. wget("client", "psg.xml")
  40.  
  41. print("Files downloaded!")
  42.  
  43. print("Your copy of Pocket Stargate is successfully installed!")
  44. print("You can modify \"addresses.conf\" now.")
  45. print("Execute \"psg\" command in order to run Pocket Stargate.")
Advertisement
Add Comment
Please, Sign In to add comment