Fix compile script paths

This commit is contained in:
Lewin Kelly 2024-07-05 23:56:25 +01:00
parent f4aa8a923a
commit 61cb1670ff
3 changed files with 8 additions and 17 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/processed

View File

@ -2,4 +2,4 @@
2013-related scripts, tools, and other goodies
After installing Aftman and running `aftman install`, run `lune run compile.luau` to compile the corescripts and libraries from this directory to ./corescripts/processed.
After installing Aftman and running `aftman install`, run `lune run compile.luau` to compile the corescripts and libraries from this directory to ./processed.

View File

@ -22,15 +22,9 @@ local libraryCores = {
local otherCores = {}
local plugins = {}
-- Allow for running from the base or corescripts directories
local cwd = process.cwd
local fromCoresDir = not not string.match(cwd, "corescripts/$")
local coresDir = if fromCoresDir then "." else "./corescripts"
-- local normalCoresDir = if fromCoresDir then "./luau" else "./corescripts/luau"
local normalCoresDir = `{coresDir}/luau`
local normalPluginsDir = `{coresDir}/terrain plugins`
local outputDir = `{coresDir}/processed`
local normalCoresDir = "./luau"
local normalPluginsDir = "./terrain plugins"
local outputDir = "./processed"
for _, core in ipairs(fs.readDir(normalCoresDir)) do
table.insert(
@ -43,9 +37,7 @@ for _, core in ipairs(fs.readDir(normalPluginsDir)) do
table.insert(plugins, core)
end
local pluginsDir = if fromCoresDir
then "../Client deployer"
else "./Client deployer"
local pluginsDir = "./Client deployer" -- not here but.. ya get the idea
local function processCores(
scripts: { string },
@ -54,9 +46,7 @@ local function processCores(
config: "lines" | "dense",
libraries: boolean?
)
local configFile = if fromCoresDir
then `../{config}.json5`
else `{config}.json5`
local configFile = `{config}.json5`
local w = waiter(#scripts)
@ -70,7 +60,7 @@ local function processCores(
"process",
"-c",
configFile,
`{coresDir}/{startDir}/{core}`,
`./{startDir}/{core}`,
`{endDir}/{newCore}`,
})