diff --git a/clean.ks b/clean.ks new file mode 100644 index 0000000..933a575 --- /dev/null +++ b/clean.ks @@ -0,0 +1,34 @@ +// Intended to be run from volume 0 for checking compiled sizes. + +switch to 0. +cleanHere(). + +function cleanDir { + parameter dir. + + print "Entering '" + dir + "'.". + cd(dir). + compileHere(). + cd(".."). + print "Leaving '" + dir + "'.". +} + +function cleanHere { + local fileList is list(). + list files in fileList. + + for f in fileList { + if f:ISFILE { + if f:EXTENSION = "ksm" { + print "Deleting '" + f:NAME + "'.". + deletepath(f). + } + } else if f:NAME[0] <> "." { + 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.