From d9115bbfd207c1be6fc15b6978d5e4846046ce50 Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Mon, 25 May 2020 21:38:45 -0400 Subject: [PATCH] remove glob filter/key --- util/tup-ext.lua | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/util/tup-ext.lua b/util/tup-ext.lua index 1b057e97..e026e6b9 100644 --- a/util/tup-ext.lua +++ b/util/tup-ext.lua @@ -46,39 +46,15 @@ end function glob(pat, opts) local results = {} - local filter = opts and opts.filter - local key = opts and opts.key - local seen = {} for pat in iter(globpat_normalize(pat)) do for file in iter(tup.glob(pat)) do - if key then - local k = key(file) - if seen[k] then - goto continue - end - seen[k] = true - end - - if filter then - if not filter(file) then - goto continue - end - end - table.insert(results, file) - ::continue:: end end return results end - -function glob_matches(pat, opts) - local matched = glob(pat, opts) - return #matched > 0 -end - -- Commands local function cspec2cmd(cmdSpec)