Advertisement
LaughingLeader

ComputerCraft Smeltery Program Updater

Jun 15th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local programName = "smeltery";
  2. local programPasteURL = "HE0Kgjns";
  3. local autoRun = true;
  4. local onDisk = true;
  5.  
  6. local updateName = "update";
  7. local selfURL = "4kW55vCZ";
  8. local selfUpdate = true;
  9.  
  10. if onDisk == true then
  11.     programName = "disk/" .. programName;
  12. end
  13.  
  14. local function update()
  15.     --fs.delete(updateName);
  16.     print("Deleting "..programName.."...");
  17.     fs.delete(programName);
  18.     print("Downloading "..programName.." from pastebin.com/"..programPasteURL.."...");
  19.     shell.run("pastebin get "..programPasteURL.." "..programName);
  20. end
  21.  
  22. print("Updating "..programName);
  23. update();
  24. print("Update complete!");
  25.  
  26. if autoRun then
  27.     shell.run(programName);
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement