new release prep

This commit is contained in:
kepler155c@gmail.com 2018-11-21 12:10:20 -05:00
parent 3b0ac4e338
commit 99687c3d28
2 changed files with 19 additions and 4 deletions

View File

@ -1,6 +1,6 @@
local Util = require('util')
local fs = _G.fs
local fs = _G.fs
local textutils = _G.textutils
local PACKAGE_DIR = 'packages'
@ -24,7 +24,7 @@ function Packages:list()
if self.packageList then
return self.packageList
end
self.packageList = Util.readTable('sys/packageList.lua') or { }
self.packageList = Util.readTable('usr/config/packages') or { }
return self.packageList
end
@ -42,9 +42,13 @@ function Packages:getManifest(package)
local url = list and list[package]
if url then
local c = Util.httpGet(url) -- will need to call load
local c = Util.httpGet(url)
if c then
return textutils.unserialize(c)
c = textutils.unserialize(c)
if c then
c.repository = c.repository:gsub('{{OPUS_BRANCH}}', _G.OPUS_BRANCH)
return c
end
end
end
end

View File

@ -24,6 +24,17 @@ if not fs.exists('usr/config/shell') then
})
end
if not fs.exists('usr/config/packages') then
local packages = {
[ 'develop-1.8' ] = 'https://pastebin.com/raw/WhEiNGZE',
[ 'master-1.8' ] = 'https://pastebin.com/raw/pexZpAxt',
}
if packages[_G.OPUS_BRANCH] then
Util.download(packages[_G.OPUS_BRANCH], 'usr/config/packages')
end
end
local config = Util.readTable('usr/config/shell')
if config.aliases then
for k in pairs(shell.aliases()) do