Advertisement
lignite0

LigCraftSoft X Program

Jul 3rd, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. -- LigCraftSoft X Program --
  2.  
  3. repoURI = "https://bitbucket.org/lignite0/ligcraftsoft";
  4.  
  5. local args = {...};
  6. local cmd = table.remove(args, 1);
  7. local libname = "xlig";
  8. local file = libname.."/pkg";
  9.  
  10. if not fs.exists(file) then
  11.     print("Detect first executing...");
  12.     local path = repoURI.."/raw/master/"..file..".lua?nocache"..math.random(0, 99999);
  13.     local program = http.get(path);
  14.     fs.makeDir(libname);
  15.     local storage = fs.open(file, "w");
  16.     storage.write(program.readAll());
  17.     storage.close();
  18.     program.close();
  19.     os.loadAPI(file);
  20.     pkg.install();
  21.     print("LigCraftSoft installed!");
  22. end
  23.  
  24. os.loadAPI(libname.."/exe");
  25. exe.parse({...});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement