correct syntax errors in core scripts
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user