Skip to content
Snippets Groups Projects
Verified Commit 8b540f86 authored by Karel Koci's avatar Karel Koci :metal:
Browse files

lists: add bootstrap list

parent 83b906f4
Branches
Tags
1 merge request!123Turris OS 5.0 (HBK)
--[[
Root script for updater-ng configuration usable for bootstrapping.
This script expects following variables to be possibly defined in environment:
BOARD: board name (Mox|Omnia|Turris)
L10N: commas separated list of languages to be installed in root.
LISTS: commas separated list of package lists to be included in root.
TESTKEY: if definied non-empty then test kyes are included in installation
]]
-- Sanity checks
if root_dir == "/" then
DIE("Bootstrap is not allowed on root.")
end
-- Get target board
-- Note: this is named as model for backward compatibility with variable provided
-- by updater version <63
model = os.getenv('BOARD')
if not board then
-- TODO we might ask interactively
DIE("Target board has to be provided by BOARD environment variable.")
end
Export('model')
-- Load requested localizations
l10n = {}
for lang in os.getenv('L10N'):gmatch('[^,]+') do
table.insert(l10n, lang)
end
Export('l10n')
-- This is helper function for including localization packages.
-- (This is copy of standard entry function that can be found in pkgupdate conf.lua)
function for_l10n(fragment)
for _, lang in pairs(l10n or {}) do
Install(fragment .. lang, {ignore = {'missing'}})
end
end
Export('for_l10n')
-- Aways include base script
Script('base.lua')
-- Include any additional lists
for list in os.getenv('LISTS'):gmatch('[^,]+') do
Script(list .. '.lua')
end
if os.getenv('TESTKEY') then
Install('cznic-repo-keys-test')
end
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment