kOS/compileall.ks

30 lines
585 B
Plaintext

// Intended to be run from volume 0 for checking compiled sizes.
switch to 0.
compileHere().
function compileDir {
parameter dir.
cd("dir").
compileHere().
cd("..").
}
function compileHere {
local fileList is list().
list files in fileList.
for f in fileList {
if f:ISFILE {
compile f.
} else {
compileDir(f).
}
}
}
// TODO: might be neat to actually do a filesize comparison and print a report or something,
// specifically iterating files NOT to compile.
// TODO: We could hypothetically even integrate this with the bootstrapper.