Develop 1.8 #20

Merged
Kan18 merged 242 commits from develop-1.8 into master-1.8 2019-11-10 20:52:08 -05:00
2 changed files with 28 additions and 6 deletions
Showing only changes of commit 852bf3f6a6 - Show all commits

View File

@@ -1,6 +1,28 @@
local PASTEBIN_URL = 'http://pastebin.com/raw'
local GIT_URL = 'https://raw.githubusercontent.com'
local DEFAULT_PATH = (package and (package.path .. ';') or '?;?.lua;?/init.lua;') .. '/sys/apis/?;/sys/apis/?.lua'
local function split(str, pattern)
local t = { }
local function helper(line) table.insert(t, line) return "" end
helper((str:gsub(pattern, helper)))
return t
end
local luaPaths = package and package.path and split(package.path, '(.-);') or { }
for i = 1, #luaPaths do
if luaPaths[i] == '?' or luaPaths[i] == '?.lua' then
luaPaths[i] = nil
end
end
table.insert(luaPaths, 1, '?')
table.insert(luaPaths, 2, '?.lua')
table.insert(luaPaths, 3, '/usr/apis/?')
table.insert(luaPaths, 4, '/usr/apis/?.lua')
table.insert(luaPaths, 5, '/sys/apis/?')
table.insert(luaPaths, 6, '/sys/apis/?.lua')
local DEFAULT_PATH = table.concat(luaPaths, ';')
local DEFAULT_BRANCH = _ENV.OPUS_BRANCH or _G.OPUS_BRANCH or 'develop-1.8'
local DEFAULT_UPATH = GIT_URL .. '/kepler155c/opus/' .. DEFAULT_BRANCH .. '/sys/apis'

View File

@@ -13,19 +13,19 @@ local helpPaths = Util.split(help.path(), '(.-):')
table.insert(helpPaths, '/sys/help')
local function addEntry(t, e)
local function addEntry(t, e, n)
for _,v in ipairs(t) do
if v == e then
return true
end
end
table.insert(t, 1, e)
table.insert(t, n or 1, e)
end
local function addRequirePath(t, path)
addEntry(t, string.format('/%s/?', path))
addEntry(t, string.format('/%s/?.lua', path))
addEntry(t, string.format('/%s/?/init.lua', path))
addEntry(t, string.format('/%s/?/init.lua', path), 7)
addEntry(t, string.format('/%s/?.lua', path), 7)
addEntry(t, string.format('/%s/?', path), 7)
end
for name in pairs(Packages:installed()) do