Fix up hover script and improve bootloading.

This commit is contained in:
Anna Rose Wiggins 2021-08-06 04:57:07 -04:00
parent 75a7dfec22
commit 2099d0a284
6 changed files with 105 additions and 61 deletions

View file

@ -35,7 +35,14 @@ function compileLibs {
if lib:StartsWith("/prog") {
set tgt to lib:Remove(0, 5).
}
compile "0:" + lib to "1:" + tgt.
local res is true.
compile "0:" + lib.
set res to copypath("0:" + lib + ".ksm", "1:" + tgt).
deletepath("0:" + lib + ".ksm").
if not res {
print "Can't copy compiled file '" + lib + "', aborting.".
print ERR. // intentional error to trap execution
}
}
}
@ -46,7 +53,10 @@ function copyLibs {
if lib:StartsWith("/prog") {
set tgt to lib:Remove(0, 5).
}
copypath("0:" + lib, "1:" + tgt).
if not copypath("0:" + lib, "1:" + tgt) {
print "Can't copy file '" + lib + "', aborting.".
print ERR. // intentional error to trap execution
}
}
}