This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "luci.jsonc" | |
function to_map(obj, key) | |
local rv = { } | |
for _,el in ipairs(obj) do | |
rv[string.upper(el[key])] = el | |
el[key]=nil | |
end | |
return rv | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Versions versions = new Versions(); | |
versions.load(target.getRootDir()); | |
target.getExtensions().add("ver", versions); |