initial program to extract GPL source from running Moby for #45

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2016-03-18 15:19:56 +00:00
parent af7777c832
commit 16f296a247
4 changed files with 82 additions and 0 deletions

18
licensing/gpl.lua Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/lua
p = {}
f = io.open("/lib/apk/db/installed")
for line in f:lines() do
if line == "" then
if p.L:match("[Gg][Pg][Ll]") then
print(p.P, p.L, p.c)
end
p = {}
else
k, v = line:match("(%a):(.*)")
if k then
p[k] = v
end
end
end