Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local file = ...
- if not file or not fs.exists(file) then
- print("Usage: "..shell.getRunningProgram().." <path>")
- return
- end
- local handle = fs.open(file, "r")
- local commands = {}
- local line = handle.readLine()
- while line do
- commands[#commands + 1] = line
- line = handle.readLine()
- end
- handle.close()
- for _,cmd in pairs(commands) do
- shell.run(cmd)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement