Skip to content
Snippets Groups Projects
Commit 6f1777b0 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-core: add platform utility module

parent 1a52c6bd
No related branches found
No related tags found
No related merge requests found
local platform_info = require 'platform_info'
local util = require 'luci.util'
local setmetatable = setmetatable
module 'gluon.platform'
setmetatable(_M,
{
__index = platform_info,
}
)
function match(target, subtarget, boards)
if get_target() ~= target then
return false
end
if get_subtarget() ~= subtarget then
return false
end
if not util.contains(boards, get_board_name()) then
return false
end
return true
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment