Skip to content
Snippets Groups Projects
Commit e993f222 authored by Matthias Schiffer's avatar Matthias Schiffer Committed by David Bauer
Browse files

scripts/target_lib.lua: reorganize images into per-device lists

parent 8bc602b0
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,8 @@ local function clean(image, name)
lib.exec {'rm', '-f', dir..'/'..file}
end
for _, image in ipairs(lib.images) do
for _, images in pairs(lib.images) do
for _, image in ipairs(images) do
clean(image, image.image)
local destdir, destname = image:dest_name(image.image)
......@@ -52,6 +53,7 @@ for _, image in ipairs(lib.images) do
lib.exec {'ln', '-s', destname, destdir..'/'..aliasname}
end
end
end
-- Copy opkg repo
......
......@@ -48,8 +48,10 @@ local function generate(image)
end
end
for _, image in ipairs(lib.images) do
for _, images in pairs(lib.images) do
for _, image in ipairs(images) do
if image.subdir == 'sysupgrade' then
generate(image)
end
end
end
......@@ -143,7 +143,9 @@ local image_mt = {
}
local function add_image(image)
table.insert(M.images, setmetatable(image, image_mt))
local device = image.image
M.images[device] = M.images[device] or {}
table.insert(M.images[device], setmetatable(image, image_mt))
end
function F.try_config(...)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment