blueberrys

CC - Blue Miner Installer

Mar 23rd, 2015
7,879
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 KB | None | 0 0
  1. --[[
  2. Blue Miner Installer
  3. (installer) Version 1.2
  4. ]]
  5.  
  6. --[[
  7. Install:
  8. pastebin run yFhYMM9c
  9.  
  10. Run:
  11. Miner
  12. ]]
  13.  
  14. local user = "blueberrys"
  15. local repo = "cc-miner"
  16. local dir = "blue-miner"
  17. local exclFiles = {
  18.     "README.md",
  19.     ".gitattributes",
  20.     ".gitignore",
  21.  
  22.     "pastebin"
  23. }
  24.  
  25. local run = fs.combine(dir, "Miner.lua")
  26. local alias = "Miner"
  27.  
  28. -- Selective install
  29. local ensureBlueApiId = "xQfeXVgj"
  30. local params = ""
  31. --  -- Leave empty to check for version
  32. --  local apis = {
  33. --      -- "b_git",
  34. --      }
  35. --
  36. --  for _, api in pairs(apis) do
  37. --      params = params .. " " .. api
  38. --  end
  39. shell.run("pastebin run", ensureBlueApiId, params)
  40.  
  41. --  -- Full force install
  42. --  local blueApiId = "yy7gqfBQ"
  43. --  shell.run("pastebin run", blueApiId)
  44.  
  45. --
  46.  
  47. if not b_api or not b_git or not b_startup then
  48.     print("Miner requires BlueAPI")
  49.     return
  50. end
  51.  
  52. --
  53.  
  54. -- Install Miner
  55. b_api.load("b_git")
  56. b_git.install(user, repo, "master", dir, exclFiles)
  57.  
  58. -- Set alias
  59. b_api.load("b_startup")
  60. b_startup.addAlias(alias, run)
  61. shell.setAlias(alias, run)
  62.  
  63. print("Type \"Miner\" to run")
Advertisement
Add Comment
Please, Sign In to add comment