Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Turris
updater
updater
Commits
6335e6c6
Verified
Commit
6335e6c6
authored
Jun 08, 2017
by
Karel Koci
🤘
Browse files
Run user list's script only once
Running same Script multiple times is invalid.
parent
8a14fbd7
Pipeline
#5377
passed with stage
in 14 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/pkgupdate/configs/entry.lua
View file @
6335e6c6
...
...
@@ -85,10 +85,16 @@ if uci and base_url then
if
type
(
lists
)
==
"string"
then
lists
=
{
lists
}
end
local
exec_list
=
{}
if
type
(
lists
)
==
"table"
then
for
_
,
l
in
ipairs
(
lists
)
do
-- TODO: Make restricted security work
Script
(
"userlist-"
..
l
,
base_url
..
"userlists/"
..
l
..
".lua"
,
script_options
)
if
exec_list
[
l
]
then
WARN
(
"User list "
..
l
..
" specified multiple times"
)
else
-- TODO: Make restricted security work
Script
(
"userlist-"
..
l
,
base_url
..
"userlists/"
..
l
..
".lua"
,
script_options
)
exec_list
[
l
]
=
true
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment