Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = { ... }
- if #tArgs == 1 then
- if fs.exists(tArgs[1]) then
- file = fs.open(tArgs[1], "r")
- for line in io.lines(tArgs[1]) do
- script = file.readLine()
- if script ~= nil then
- shell.run(line)
- else
- break
- end
- end
- file.close()
- else
- error("Can't find file " .. tArgs[1])
- end
- elseif #tArgs >= 1 then
- error("More than one file is NYI")
- elseif #tArgs <= 1 then
- print("Usage: ")
- print(shell.getRunningProgram() .. " <file>")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement