Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Common utilities
- Program base
- --]]
- program = {
- directory = shell.resolve("/"..shell.getRunningProgram().."/..")
- }
- function program.load(...)
- for i,relativePath in ipairs({...}) do
- local currentDir = program.directory
- local filePath = fs.combine(currentDir, relativePath)
- local fileDir = shell.resolve("/"..filePath.."/..")
- program.directory = fileDir
- dofile(filePath)
- program.directory = currentDir
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment