correct syntax errors in core scripts

This commit is contained in:
2026-02-15 22:23:04 -06:00
parent 913ec9afb1
commit 8f92870141
12 changed files with 93 additions and 56 deletions

View File

@@ -86,24 +86,27 @@ function pack(sources, archive_path, read_dir) {
function add_recursive(path) {
var full_path = base_dir + "/" + path
var st = null
var list = null
var data = null
if (path == ".") full_path = base_dir
if (read_dir == null && path != ".") full_path = path
var st = fd.stat(full_path)
st = fd.stat(full_path)
if (!st) {
log.console("Could not stat " + full_path)
return
}
if (st.isDirectory) {
var list = fd.readdir(full_path)
list = fd.readdir(full_path)
arrfor(list, function(item) {
if (item == "." || item == "..") return
var sub = path == "." ? item : path + "/" + item
add_recursive(sub)
})
} else {
var data = fd.slurp(full_path)
data = fd.slurp(full_path)
if (data) {
writer.add_file(path, data)
log.console("Added " + path)