-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- 1. run 'pastebin get 6Ygb1pZp ExcavateInit' IN THE ROOT DIRECTORY to download this file
-- 2. run 'ExcavateInit'
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- HB810Utu collect
-- W2qVHGc2 doRefuel
-- mzj74X2b goTo
-- kUWkUJzu main
-- qxskVVdf returnSupplies
-- PuQxFFKz tryDown
-- NXnxqmUZ tryForwards
-- dURixY5G turn
-- xW8BM9Rc unload
-- create/set directory for modules of this program
local workDir = "/excavate"
local intent
print("\nWhat would you like to do?: <run> to run / <inst> to install or reinstall.")
intent = io.read()
if intent == "run" then
shell.setDir(workDir)
shell.run("main")
elseif intent == "inst" then
if fs.exists(workDir) then
print("\nThe directory '/excavate' already exists. Would you like to delete it? y/n:")
local userInput = io.read()
if userInput == "y" then
fs.delete(workDir)
print("\n\tdeleted preexisting directory: " .. workDir)
else
shell.setDir("/")
error("Did NOT delete preexisting directory. Aborting.")
end
end
fs.makeDir(workDir)
print("\tDirectory created: " .. workDir)
shell.setDir(workDir)
-- download all modules of "Excavate" into the directory created above
shell.run("/rom/programs/http/pastebin get HB810Utu collect")
shell.run("/rom/programs/http/pastebin get W2qVHGc2 doRefuel")
shell.run("/rom/programs/http/pastebin get mzj74X2b goTo")
shell.run("/rom/programs/http/pastebin get kUWkUJzu main")
shell.run("/rom/programs/http/pastebin get qxskVVdf returnSupplies")
shell.run("/rom/programs/http/pastebin get PuQxFFKz tryDown")
shell.run("/rom/programs/http/pastebin get NXnxqmUZ tryForwards")
shell.run("/rom/programs/http/pastebin get dURixY5G turn")
shell.run("/rom/programs/http/pastebin get xW8BM9Rc unload")
-- execute
shell.run("main")
else
error("invalid input")
end
Comments