G2A Many GEOs
SHARE
TWEET

tr_installer

kssr3951 Jun 10th, 2014 280 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local files = { };
  2.  
  3. if fs.exists("tr") then
  4.   table.insert(files, "tr");
  5. end
  6.  
  7. if fs.exists("lib_turtle_0.2.4") then
  8.   table.insert(files, "lib_turtle_0.2.4");
  9. end
  10.  
  11. if fs.exists("lib_log") then
  12.   table.insert(files, "lib_log");
  13. end
  14.  
  15. if 0 < #files then
  16.   for _, val in ipairs(files) do
  17.     print(val);
  18.   end
  19.   print(tostring(#files) .. " file(s) exists.");
  20.   print("overwrite? (y/n)");
  21.   local ch = read();
  22.   if ch ~= "y" then
  23.     print("Installation was canceled.");
  24.     return;
  25.   end  
  26.   for _, val in ipairs(files) do
  27.     fs.delete(val);
  28.   end
  29. end
  30.  
  31. print("Installing...");
  32.  
  33. shell.run("pastebin get vMFb2Ske lib_log");
  34. shell.run("pastebin get p9r13ik2 lib_turtle_0.2.4");
  35. shell.run("pastebin get nCNwCJp0 tr");
  36.  
  37. 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