#!/usr/bin/lua
local lines = io.lines("b")
local pkgs = {}
for line in lines do
local match = line:match"Name *: ([^%s]+)"
if match then
io.write(';\nraur.pkg("', match, '")')
end
local match = line:match"Version *: ([^%s]+)"
if match then
io.write('\n .version("', match, '")')
end
local match = line:match"Depends On *: (.*)"
if match then
for depend in match:gmatch"[^%s]+" do
if depend ~= "None" then
io.write('\n .depend("', depend, '")')
end
end
end
local match = line:match"Make Deps *: (.*)"
if match then
for depend in match:gmatch"[^%s]+" do
if depend ~= "None" then
io.write('\n .make_depend("', depend, '")')
end
end
end
local match = line:match"Provides *: (.*)"
if match then
for depend in match:gmatch"[^%s]+" do
if depend ~= "None" then
io.write('\n .provide("', depend, '")')
end
end
end
end
io.write(';\n')