mirror of
https://github.com/pesde-pkg/scripts.git
synced 2024-12-12 15:00:37 +00:00
20 lines
573 B
Text
20 lines
573 B
Text
|
local function enter(fn: (args: { string }) -> number?): never
|
||
|
local process = require("@lune/process")
|
||
|
local stdio = require("@lune/stdio")
|
||
|
|
||
|
local startTime = os.clock()
|
||
|
local exitCode = fn(table.clone(process.args))
|
||
|
|
||
|
stdio.write(
|
||
|
`done in {stdio.style("dim")}{string.format("%.2fs", os.clock() - startTime)}{stdio.style("reset")}!\n`
|
||
|
)
|
||
|
|
||
|
return process.exit(exitCode)
|
||
|
end
|
||
|
|
||
|
return enter(function(args: { string }): number?
|
||
|
local ok, _ = require("../src").generators.rojo.syncConfig(table.remove(args, 1), args, true)
|
||
|
|
||
|
return tonumber(ok)
|
||
|
end)
|