Module:FreeBSD: Difference between revisions

From Nasqueron Agora
(Created page with "local p = {} -- Formats a FreeBSD port link function p.PrintsFreeBSDPort(frame) if frame.args[2] == nil then link = "http://www.freshports.org/" .. frame.args[1] ...")
 
No edit summary
Line 1: Line 1:
local p = {}
local p = {}


-- Formats a FreeBSD port link
-- Gets a formatted FreeBSD port link
function p.PrintsFreeBSDPort(frame)
function p.GetsPortLink(frame)
     if frame.args[2] == nil then
     if frame.args[2] == nil then
         link = "http://www.freshports.org/" .. frame.args[1]
         link = "http://www.freshports.org/" .. frame.args[1]

Revision as of 22:38, 21 January 2013

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[2] == nil then
        link = "http://www.freshports.org/" .. frame.args[1]
    else
        link = frame.args[2]
    end
    
    return '[' .. link .. ' ' .. frame.args[1] .. ']'
end

return p