Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
alpine
awall
Commits
579e16a5
Commit
579e16a5
authored
Sep 03, 2012
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load modules in alphabetical order
parent
b8bd8ddf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
awall/init.lua
awall/init.lua
+7
-3
No files found.
awall/init.lua
View file @
579e16a5
...
...
@@ -50,13 +50,17 @@ function loadmodules(path)
local
cdir
=
lfs
.
currentdir
()
if
path
then
lfs
.
chdir
(
path
)
end
local
modules
=
{}
for
modfile
in
lfs
.
dir
((
path
or
'/usr/share/lua/5.1'
)
..
'/awall/modules'
)
do
if
stringy
.
endswith
(
modfile
,
'.lua'
)
then
local
name
=
'awall.modules.'
..
string.sub
(
modfile
,
1
,
-
5
)
table.insert
(
modules
,
'awall.modules.'
..
string.sub
(
modfile
,
1
,
-
5
))
end
end
table.sort
(
modules
)
for
i
,
name
in
ipairs
(
modules
)
do
require
(
name
)
readmetadata
(
package.loaded
[
name
])
end
end
lfs
.
chdir
(
cdir
)
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