Skip to content

Commit

Permalink
dirs: Moved sources into their own subdirectory to prevent module col…
Browse files Browse the repository at this point in the history
…lision
  • Loading branch information
Snaipe committed Oct 24, 2016
1 parent 1cc1cdc commit 4612421
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ WS_PLUGIN_DIR := $(HOME)/.config/wireshark/plugins/

bootstrap: wssdl.lua

wssdl.lua: $(wildcard src/*.lua)
wssdl.lua: $(wildcard src/wssdl/*.lua)
$(LUA) pack.lua src > wssdl.lua

install: $(HOME)/.config/wireshark/plugins/ | bootstrap
Expand Down
6 changes: 3 additions & 3 deletions pack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ local fs = require 'lfs'

local args = {...}
local root = args[1]:gsub('/$', ''):gsub('\\$', '')
local files = {}

function scandir(root, path)
local files = {}
-- adapted from http://keplerproject.github.com/luafilesystem/examples.html
path = path or ''
for file in fs.dir(root..path) do
Expand All @@ -49,7 +49,7 @@ function scandir(root, path)
return files
end

local files = scandir(root)
scandir(root)

acc = { [[
--
Expand Down Expand Up @@ -99,7 +99,7 @@ do
end
end
return require 'wssdl-core'
return require 'wssdl.core'
]])

print(table.concat(acc))
File renamed without changes.
6 changes: 3 additions & 3 deletions src/wssdl-core.lua → src/wssdl/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ function tprint (tbl, indent)
end
end

require('bit') -- Monkey-patch 'bit' library
require('wssdl.bit') -- Monkey-patch 'bit' library

local placeholder = require('placeholder'):init(wssdl)
local utils = require('utils')
local placeholder = require('wssdl.placeholder'):init(wssdl)
local utils = require('wssdl.utils')

wssdl.init = function (self, env)
self.env = env
Expand Down
2 changes: 1 addition & 1 deletion src/placeholder.lua → src/wssdl/placeholder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-- You should have received a copy of the GNU General Public License
-- along with wssdl. If not, see <http://www.gnu.org/licenses/>.

local specifiers = require 'specifiers'
local specifiers = require 'wssdl.specifiers'

-- Module
local placeholder = {}
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 4612421

Please sign in to comment.