Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
8cb03884
Unverified
Commit
8cb03884
authored
7 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
scripts/check_site.lua: enable in_site()/in_domain() checks
parent
146787fa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/check_site.lua
+21
-13
21 additions, 13 deletions
scripts/check_site.lua
with
21 additions
and
13 deletions
scripts/check_site.lua
+
21
−
13
View file @
8cb03884
...
...
@@ -63,19 +63,6 @@ local function merge(a, b)
end
function
in_site
(
var
)
return
var
end
function
in_domain
(
var
)
return
var
end
function
this_domain
()
return
domain_code
end
local
function
path_to_string
(
path
)
return
table.concat
(
path
,
'/'
)
end
...
...
@@ -118,6 +105,27 @@ local function var_error(path, val, msg)
end
function
in_site
(
path
)
if
has_domains
and
loadpath
(
nil
,
domain
,
unpack
(
path
))
~=
nil
then
exit_error
(
domain_src
(),
'%s is allowed in site configuration only'
,
path_to_string
(
path
))
end
return
path
end
function
in_domain
(
path
)
if
has_domains
and
loadpath
(
nil
,
site
,
unpack
(
path
))
~=
nil
then
exit_error
(
site_src
(),
'%s is allowed in domain configuration only'
,
path_to_string
(
path
))
end
return
path
end
function
this_domain
()
return
domain_code
end
function
extend
(
path
,
c
)
if
not
path
then
return
nil
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment