diff --git a/lib/boot.ks b/lib/boot.ks index 0b520e5..eb9a468 100644 --- a/lib/boot.ks +++ b/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)). } } }