Skip to content

Instantly share code, notes, and snippets.

View sinlerdev's full-sized avatar
💭
the curse of my cursed pfp shall curse you forever

sinlernick sinlerdev

💭
the curse of my cursed pfp shall curse you forever
  • @Plothan
View GitHub Profile
-- 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]
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)