reorganization

This commit is contained in:
kepler155c@gmail.com
2017-09-15 01:08:04 -04:00
parent b5ee5db16b
commit 64c68f2662
54 changed files with 175 additions and 15800 deletions

View File

@@ -20,8 +20,7 @@ local options = {
desc = 'Displays the options' },
}
local USR_SCRIPTS_PATH = 'usr/scripts'
local SYS_SCRIPTS_PATH = 'sys/etc/scripts'
local SCRIPTS_PATH = 'usr/etc/scripts'
local nullTerm = Terminal.getNullTerm(term.current())
local turtles = { }
@@ -228,21 +227,8 @@ end
function page.tabs.scripts:draw()
local function combineDirs(...)
local list = { }
for _,path in pairs({...}) do
if fs.exists(path) then
local files = fs.list(path)
for _,f in pairs(files) do
list[f] = fs.combine(path, f)
end
end
end
return list
end
Util.clear(self.values)
local files = combineDirs(SYS_SCRIPTS_PATH, USR_SCRIPTS_PATH)
local files = fs.list(SCRIPTS_PATH)
for f,path in pairs(files) do
table.insert(self.values, { label = f, path = path })
end