This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Syntax | |
-- lune script SUBCOMMAND ==flag value | |
-- lune scri[t ==flag value SUBCOMMAND | |
local function parseFlags(arguments: { string }) | |
local result = {} | |
for index, keyOrValue in arguments do | |
if keyOrValue:find("==") then | |
local shouldBeValue = arguments[index + 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function findWorkables(path: string) | |
local Workables = {} | |
for _, objPath in fs.readDir(path) do | |
local joinedPath = string.format("%*/%*", path, objPath) | |
if fs.isDir(joinedPath) then | |
table.insert(Workables, findWorkables(joinedPath)) | |
else | |
if objPath:match("%.work") then | |
table.insert(Workables, joinedPath) |