libs/ipkg: give caller more control over filter pattern

This commit is contained in:
Jo-Philipp Wich 2011-10-15 03:10:19 +00:00
parent 88d75f3257
commit f83cdb1b8b

View file

@ -158,7 +158,9 @@ end
-- List helper
function _list(action, pat, cb)
local fd = io.popen(ipkg .. " " .. action .. (pat and " '*" .. pat:gsub("'", "") .. "*'" or ""))
local fd = io.popen(ipkg .. " " .. action ..
(pat and (" '%s'" % pat:gsub("'", "")) or "")) -- .. " | grep -vE '^ '")
if fd then
local name, version, desc
while true do