Fix smart compile code.
This commit is contained in:
parent
37cbab7724
commit
05267b0283
15
lib/boot.ks
15
lib/boot.ks
|
@ -17,7 +17,7 @@ function Bootstrap {
|
|||
|
||||
// compile the libraries
|
||||
for lib in libs {
|
||||
compileFile(program, program, debug).
|
||||
compileFile(lib, lib, debug).
|
||||
}
|
||||
|
||||
// Either run init with a terminal open...
|
||||
|
@ -37,7 +37,7 @@ function Bootstrap {
|
|||
} else {
|
||||
set CORE:BOOTFILENAME to "/init".
|
||||
}
|
||||
reboot.
|
||||
// reboot.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,8 +52,9 @@ function compileFile {
|
|||
}
|
||||
|
||||
compile "0:" + src.
|
||||
local srcVF is Open(src + ".ks").
|
||||
local compiledVF is Open(src + ".ksm").
|
||||
local srcVF is Open("0:" + src + ".ks").
|
||||
local compiledVF is Open("0:" + src + ".ksm").
|
||||
|
||||
if srcVF:SIZE < compiledVF:SIZE {
|
||||
CopyPath("0:" + src + ".ks", "1:" + dest + ".ks").
|
||||
} else {
|
||||
|
@ -70,9 +71,9 @@ function addLibs {
|
|||
local contents is srcVF:ReadAll().
|
||||
for line in contents {
|
||||
if line:Contains("RunOncePath") {
|
||||
local start is line:Find("\"").
|
||||
local end is line:FindLast("\"").
|
||||
libs:Add(line:Substring(start, end - start)).
|
||||
local start is line:Find(char(34)).
|
||||
local end is line:FindLast(char(34)).
|
||||
libs:Add(line:Substring(start + 1, end - start - 1)).
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user