Module:FreeBSD

From Nasqueron Agora
Revision as of 15:13, 13 February 2017 by Dereckson (talk | contribs) (freshports.org now has HTTPS support)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:FreeBSD/doc

local p = {}

-- Gets a formatted FreeBSD port link
function p.GetsPortLink(frame)
    if (frame.args.url == nil or frame.args.url == '') then
        link = "https://www.freshports.org/" .. frame.args.port
    else 
        link = frame.args.url
    end
    
    return '[' .. link .. ' ' .. frame.args.port .. ']'
end

return p