Split user script template logic into separate script

This commit is contained in:
emanuele-f 2020-01-23 14:42:02 +01:00
parent 25212db5ce
commit 1c8c93ff6e
4 changed files with 208 additions and 56 deletions

View file

@ -18,6 +18,7 @@ if(subdir == nil) then
end
local target_type = user_scripts.getSubdirTargetType(subdir)
local script_type = user_scripts.script_types[subdir]
local config_sets = user_scripts.getConfigsets()
local rv = {}
@ -47,6 +48,11 @@ for _, configset in pairs(config_sets) do
name = configset.name,
targets = targets,
}
if(script_type and script_type.default_config_only) then
-- Only return the default
break
end
end
print(json.encode(rv))